Reputation: 17
I'll try to be as posible specific with my problem:
When i am in my web page, i have already selected one tab, so i'm trying to validate that the user doesn't change from one tab if my actual tab it is not validated or processed (in example a form capture). So in the event of the click of the other tabs i'm inserting the following code:
$("#aTab0").click(function() {
if(!validation){
var $tabs=$(".tabs").tabs();
$tabs.tabs('select', 0);
return;
}
});
And it's ok, it changes again to the actual tab BUT the style of the TAB clicked has changed.. i want it to remain un-clicked..
An idea of what i want is if i could stop the event of the other(s) tab being clicked..
PLEASE HELP! I need somebody.. =P
THANKS in advance!
Upvotes: 0
Views: 242
Reputation: 1047
Change "return;" to "return false;", that should do it. Returning "false" in an event handling function should stop the event from processing.
Upvotes: 1