【发布时间】:2011-03-12 21:40:07
【问题描述】:
我正在尝试在我的 Wordpress 主题管理页面中使用 jQuery UI 对话框脚本。一切都直接来自 UI 演示,但我最终得到了一个对话框,其中对话框没有弹出任何内容,而是埋在底角,就在结束 body 标记之前。
UI 对话框脚本与 wp_enqueue_script 正确排队,因为它显示在源代码中,jquery(来自 google API)和 UI 核心也是如此。
jQuery(document).ready(function($) {
$("#dialog").dialog();
}); //end onload stuff
然后我的选项页面中有这个:
<div id="dialog" title="Basic dialog">
<p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p>
</div>
【问题讨论】:
-
好吧,我解决了。再次查看演示,显然有相当多的脚本被排入队列,这些脚本没有被提及为依赖项。 jquery.bgiframe-2.1.1.js.js , jquery.ui.widget.js , jquery.ui.mouse.js ,jquery.ui.draggable.js" ,jquery.ui.position.js , jquery.ui.resizable除了明显的 jquery.ui.dialog.js 之外,似乎都需要 .js
-
链接已损坏。