Change active tab using jquery
javascript, jquery, twitter-bootstrap
Solution
Looks like you have an "active" class to make a tab active. In this case, you can just do:
$("#home").removeClass("active"); // this deactivates the home tab
$("#profile").addClass("active"); // this activates the profile tab
Problem
I have 2 tabs on my page (using Bootstrap): ``` <ul class="nav nav-tabs" id="myTab"> <li class="active"><a href="#home">Home</a></li> <li><a href="#profile">Profile</a></li> </ul> <div class="tab-content"> <div class="tab-pane active" id="home">...</div> <div class="tab-pane" id="profile">...</div> </div> ``` When I send a POST request from the profile tab, I want to make this tab active, how can I do this?