I create UI with tabs.the tabs all contain seprate Forms.If i click the tabs the all form save function are call.For example for assumption if i fill the first tab form then i click second tab.then i refresh the page then i click the first tab.the datas are not saved.But after i fill the first tab then click second and third tab continuously and refresh the page on third tab form then click to the first tab now the data are saved.My problem is the function are not called single click immediately?
$(".tab").tabs({
selected: 0,
select: function(e, ui) {
Firsttabvalue(arraytest);
Secondtabvalue(arraytest);
Thirdtabvalue(arraytest);
return true;
}
});
I assume that you use jQueryUI tabs in your application (because you don’t specify what exact plugin do you use). And if that’s true, then if you look on page jQueryUI API you’ll get that there is no event “select” for tabs, only event “activate”.
EDITED:
You may initialize tabs using that event:
Or bind event later on:
ONE MORE EDIT:
I created simple JSFiddle for you: http://jsfiddle.net/Bqkst/. And the code here:
HTML
JS:
And each time you clicking tab – alert triggers!