How do I collapse a jQuery tab when a form is submitted?
I have a form where users can enter 开发者_开发技巧information by opening a series of jQuery tabs.
When the user submits the forms, I want to collapse any open tabs. How do I do that?
NOTE: It's not enough just to hide the content of the tab. The button has to be deselected and the visibility has to be set in a way so that the form will continue to work. I tried just saying...
$(".content").hide();
...but the contents of the tab wouldn't display properly after that. People need to be able to keep working with the form and submitting it over and over. Thanks for any help you can give me!
$('#Features').submit(function() {
$(".content").hide();
$(this).find(':input').removeAttr('checked'); //uncheck all inputs
return false;
})
精彩评论