jQueryUI tab problem
For some weird reason, the event "load"开发者_Go百科 and even the option "success" from ajaxOptions got sort of a problem (or feature).
When I click on a tab, while the tab load the content thru AJAX I wanted to pop up an dialog, and when it's DEFFINITLY done, to close the dialog.
I dont know why but, the dialog is closing as soon as the ajax find out that the page exists...that kinda suck when it take a while for your page to load.
Heres my code:
$("#tabs").tabs({
select: $('#dialogLoadingData').dialog('open'),
ajaxOptions: {
success: function() {
$('#dialogLoadingData').dialog('close')
}
}
});
You need an anoymous function there, like this:
$("#tabs").tabs({
select: $('#dialogLoadingData').dialog('open'),
ajaxOptions: {
success: function() {
$('#dialogLoadingData').dialog('close')
}
}
});
Also, as @Fosco noted in comments, success
also needs a typo fix.
精彩评论