duanou9758 2010-03-12 09:32
浏览 30

Facebox里面的Jquery

I have facebox setup and it works. when I load an external page with a tab based navigation (JQuery too) the modal works but the nav doesnt. If it isnt clear I actually want the tabs to be inside the lightbox. And I also have php/mysql running inside the lightbox if that can change anything. Thanks for any help.

Edit=> Sorry about the lack of code here is the code on the page that gets loaded into the facebox:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="js/jquery-ui-1.7.2.custom.min.js"></script>
    <script type="text/javascript">
        $(function(){
            $('#tabs').tabs();
            });
    </script>
<div id="tabs">
        <ul>
            <li><a href="#tabs-1">Informations</a></li>
            <li><a href="#tabs-2">Factures en attente</a></li>
            <li><a href="#tabs-3">Marché en cours</a></li>
        </ul>

I saw that maybe using Jquery live might help but am unsure as to whether its what I need.

  • 写回答

1条回答 默认 最新

  • doujiu7680 2011-06-29 22:37
    关注

    I think i understand, but i don't know enough about facebox. if it loads via AJAX then you will need to use the .live function of jQuery inside of your document ready like this: (on your main page, not the modal page):

    $(document).ready(function () {
        $('.modal_box').live('load', function () {
            $('#tabs').tabs();
        });
    });
    

    If it loads by iFrame, then you will not need to use .live, however you may consider wrapping the tabs call inside of a document ready like this (inside of the modal page):

    $(document).ready(function () {
        $('#tabs').tabs();
    });
    
    评论

报告相同问题?

悬赏问题

  • ¥15 关于#hadoop#的问题
  • ¥15 (标签-Python|关键词-socket)
  • ¥15 keil里为什么main.c定义的函数在it.c调用不了
  • ¥50 切换TabTip键盘的输入法
  • ¥15 可否在不同线程中调用封装数据库操作的类
  • ¥15 微带串馈天线阵列每个阵元宽度计算
  • ¥15 keil的map文件中Image component sizes各项意思
  • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏
  • ¥15 划分vlan后,链路不通了?
  • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据