Function doesn't work at second call
i have this function
function notify()
{
alert('oo');
$("#SuccessNotification").dialog({
开发者_JS百科 bgiframe: true,
modal: true,
title: 'success',
buttons: {
Ok: function() {
$(this).dialog('close');
}
}
});
}
the alert works each time this function is called but the dialog is getting poped out only first time
You have to call the dialog with the open argument like this:
function notify()
{
alert('oo');
var elem = $("#SuccessNotification")
elem.dialog({
bgiframe: true,
modal: true,
title: 'success',
buttons: {
Ok: function() {
$(this).dialog('close');
}
}
});
elem.dialog('open');
}
精彩评论