jQuery Ui - 将厚盒交换为 UI 对话框

发布于 2024-11-29 19:21:48 字数 390 浏览 6 评论 0原文

Thickbox 已被贬值,并且在 jQuery UI 选项卡中使用时会导致问题。在开始使用选项卡之前,我只是简单地调用了thickbox,它正常工作,其中包含我的远程源的url。是否有一种通用方法可以使 jQuery UI 对话框与厚盒解决方案一样工作?

我这样称呼厚盒:

<a href="URLHERE" class="thickbox" disabled title='Select a value from the list provided'><img border=0  src='images/zoom.png'></a>

Thickbox is depreciated and causes problems when used within jQuery UI Tabs. Before moving to using tabs I was simply calling thickbox which worked as normal, with the url of my remote source included. Is there a generic way that jQuery UI dialogs can be made to work the same was as the thickbox solution?

I was calling thickbox like so:

<a href="URLHERE" class="thickbox" disabled title='Select a value from the list provided'><img border=0  src='images/zoom.png'></a>

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

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

发布评论

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

评论(1

手长情犹 2024-12-06 19:21:48

替换为 UI 对话框:

$('.thickbox').click(function(){
        var href = $( this ).attr("rel");
        var dialogTitle= $(this).attr("title");

        $("#testDialogID").load(href, function() {
            var container = $(this);
            container.dialog({
                bgiframe: true,
                opacity: false,
                title: dialogTitle,
                modal: true
            })
        });

    });

Replaced with UI Dialogs:

$('.thickbox').click(function(){
        var href = $( this ).attr("rel");
        var dialogTitle= $(this).attr("title");

        $("#testDialogID").load(href, function() {
            var container = $(this);
            container.dialog({
                bgiframe: true,
                opacity: false,
                title: dialogTitle,
                modal: true
            })
        });

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