I have a sequence of the dialog window and in the last dialog i'm trying make this for remove event "close" the jquery dialog this mode:
$("#cond").dialog({
开发者_如何学Python width:'400',
height:'100',
modal: true,
closeOnEscape: false,
resizable: true,
close: function(event, ui) {
f();
}
});
function f(){
$("#cond").unbind("dialogclose");
loadsTab('tabsCond',0);
}
Well, this not work, because when i call first dialog the f() is called too. What's happening?
If you want to unbind the event i found out it's better to cancel it like this:
$("#cond").dialog('option', 'close', null)
Look at this test fiddle (press open to open the dialog: the first time you close it alerts hi, the other times nothing. http://jsfiddle.net/jHXLJ/
精彩评论