I observe that a Jquery dialog loaded using load() is not loaded within the matched element. Here's my parent document:
我观察到使用load()加载的Jquery对话框未在匹配的元素中加载。这是我的父文件:
and the document containing the dialog that is loaded:
和包含加载的对话框的文档:
Text
#loaded-dialog-wrapper is loaded, but it does not contain #loaded-dialog; it only has the script node. Instead, #loaded-dialog is contained inside a div that is added as a child to the body node. If I close the dialog, the dialog goes away, and when I click the button again, the dialog is displayed and a new div is created in the same manner as before. If I change the contents inside #loaded-dialog, on the second opening, the dialog that is displayed does not contain the updated content. However, the #loaded-dialog containing the new content is contained in the second created div.
Move your dialog options into your main document. Then assign the click directly to loaded-dialog-wrapper:
将对话框选项移动到主文档中。然后将点击直接分配给loaded-dialog-wrapper:
$('#button1').on('click',function() {
$('#loaded-dialog-wrapper').dialog(dialogOpts).html('Place your message here');
});
You don't need that 2nd document child.html
您不需要第二个文档child.html
#2
0
JqueryUI moves the dialog div inside another div, and adds it as a child of the body node. This is what I observed. To get around this, I destroyed added div upon closing the dialog. This was done in dialogOpts in child.html:
本文介绍了如何在HTML5网页模板中加入百度统计,并对模板文件、css样式表、js插件库等内容进行了说明。同时还解答了关于HTML5网页模板的使用方法、表单提交、域名和空间的问题,并介绍了如何使用Visual Studio 2010创建HTML5模板。此外,还提到了使用Jquery编写美好的HTML5前端框架模板的方法,以及制作企业HTML5网站模板和支持HTML5的CMS。 ...
[详细]