开发者

Jquery ui tab-wise validation

开发者 https://www.devze.com 2023-01-08 21:47 出处:网络
I am using UI tabs and i want to validate each tab. When I click the second tab i must validate the first tab.I开发者_如何学编程f tab is valid go to second tab, if tab is not valid stay to the curren

I am using UI tabs and i want to validate each tab.

When I click the second tab i must validate the first tab.I开发者_如何学编程f tab is valid go to second tab, if tab is not valid stay to the current tab and fill in missing form elements.And so on for all my tabs.

Can anyone help me with this.


validate the form on the select event for the tab. if you return false in that event then the tab will not be changed..

as follows :

$('#example').tabs({
    select: function(event, ui) {
        return validate;// call your validation method here and return the result 
    }
});
0

精彩评论

暂无评论...
验证码 换一张
取 消