开发者

Activate jQuery accordion section with validation errors

I am using xVal for client validation in an ASP.NET MVC application. Since I have too many fields in on开发者_运维技巧e of the forms, I split it into sections and used jQuery accordion to display one section at the same time. Is there a way to activate the accordion section which contains validation errors when the user clicks submit?


Try this code, it won't activate the panel but it will show it (same result)

            $('input#submitBuuton')
            .live("click", function() {   
                $('form').submit();     
                $('#formHolder').find('span.field-validation-error').parents('fieldset').find('legend').next().show();
                return false;
            });
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜