So, the goal is to confirm switching to another UI tab using UI Dialog plugin. Using common confirm method is simple:
jQuery("#tabsContainer").tabs({
select: function(event, ui) {
return confirm("Some confirmation message...");
}
});
but how to to achieve same behavior using Dialog modal box?
I think I have to call:
jQuery("#tabsContainer").tabs("select", ui.index);
on the "ok callback" but this is not working as I expected. Also - there are no errors being reported...
jQuery("#tabsContainer").tabs({
select: function(event, ui) {
jQuery("#dialogContainer").dialog({
buttons: {
'Ok': function() {
jQuery("#tabsContainer").tabs("select", ui.index);
},
Cancel: function() { return; }
}
});
return false;
}
});