Jquery tabs - Showing a confirmation before activate
I'm using jquery UI's tabs. When a user switches tabs, I'm checking for unsaved changes, and prompting the user accordingly. However, before the user even clicks Yes or No, the tab loads anyway. Does anyone know how I can get my function to NOT return anything until after the result has come back from my fancybox dialog? You can see I've tried a couple of different methods to return my boolean value in CheckSomething(). $("#myTabs").tabs({ select: function (event, ui) { return CheckSomething(); }, show: function (event, ui) { //do some stuff } }); function CheckSomething() { var loadMyTab =