JQuery Dialog最近给我带来了很多痛苦。 我有下面的div,我想弹出。 (忽略那些类不显示在语法中的双引号)Jquery Dialog - div在初始化后消失
TABLE class=widget-title-table border=0 cellSpacing=0 cellPadding=0>
<TBODY>
<TR>
<TD class=widget-title><SPAN class=widget-title>Basic Info</SPAN></TD>
<TD class=widget-action>
<DIV id=edit-actions jQuery1266325647362="3">
<UL class="linkbutton-menu read-mode">
<LI class="control-actions">
<A id="action-button" class="mouse-over-pointer linkbutton">Delete this stakeholder</A>
<DIV id="confirmation" class="confirmation-dialog title=Confirmation">
Are you sure you want to delete this stakeholder?
</DIV>
</LI></UL></DIV></TD></TR></TBODY></TABLE>
jQuery的这是...
$(document).ready(function() {
$('#confirmation').dialog({
bgiframe: true, modal: true, autoOpen: false, closeOnEscape: false,
draggable: true, position: 'center', resizable: false, width: 400, height: 150
});
});
,并“通过
var confirmationBox = $('#confirmation',actionContent);
if (confirmationBox.length > 0) {
//Confirmation Needed
$(confirmationBox).dialog('option', 'buttons', {
'No': function() {
$(this).dialog('close');
},
'Yes': function() {
$('ul.read-mode').hide();
$.post(requestUrl, {}, ActionCallback(context[0], renderFormUrl), 'json');
$(this).dialog('close');
}
});
$(confirmationBox).dialog('open');
}
open'ed对话
问题从初始化本身开始。 加载文档时,将从标记中删除<div #confirmation>
! 我以前有类似的问题,但我不能在这里使用该解决方案。 在这个页面上我可以有多个PopUp div。
当我在打开它之前添加了初始化;弹出窗体。但是在关闭它之后,div被移除;所以我无法再看到弹出窗口。
你看着在萤火虫的控制台,看看是否有任何错误? – Samuel 2010-02-16 12:59:56
在控制台上显示没有错误 – Zuber 2010-02-16 13:07:01
为什么你不只是使用jQuery UI – ant 2010-02-16 13:13:18