Facebox 中的 Jquery

发布于 2024-08-24 12:06:24 字数 924 浏览 6 评论 0原文

我已经设置了 Facebox,并且可以正常工作。当我加载带有基于选项卡的导航(也是 JQuery)的外部页面时,模式可以工作,但导航却不能。如果不清楚,我实际上希望选项卡位于灯箱内。我还在灯箱内运行 php/mysql,如果这可以改变任何东西的话。 感谢您的任何帮助。

编辑=>抱歉,缺少代码,这里是加载到 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>

我看到也许使用 Jquery live 可能会有所帮助,但我不确定这是否是我需要的。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

谁许谁一生繁华 2024-08-31 12:06:24

我想我明白了,但我对facebox还不够了解。如果它通过 AJAX 加载,那么您将需要在文档中使用 jQuery 的 .live 函数,如下所示:(在您的主页上,而不是模态页面):

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

如果它通过 iFrame 加载,那么您将不需要使用.live,但是您可以考虑将选项卡调用包装在准备好的文档内,如下所示(在模式页面内):

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

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();
});
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文