How do I toggle Jquery validation using Ignore attribute?
I have a panel which is toggled visible/invisible on clicking开发者_Go百科 a button. Say the panel has extra fields, I'd like to turn off validation on those fields when the panel is hidden, but turn them back on when shown.
I've seen the 'Ignore' option of the Jquery validation plugin, but I'm wondering how I'd go about re-enabling it after the panel is shown again.
May be you could use addClass/removeClass
when the panel is visible/hidden respectively?
精彩评论