javascript - How to make a nav tab active from outside with a button? -


<ul class="nav nav-tabs piluku-tabs " role="tablist">     <li role="presentation" class="active">         <a href="#home" aria-controls="home" role="tab" data-toggle="tab">personal detail</a>      </li>     <li role="presentation">          <a href="#join" aria-controls="join" role="tab" data-toggle="tab">joining detail</a>     </li>     <li role="presentation">          <a href="#education" aria-controls="education" role="tab" data-toggle="tab" id ="id2">education detail</a>     </li>     <li role="presentation">          <a href="#experience" aria-controls="education" role="tab" data-toggle="tab">experience detail</a>     </li> </ul>  <a href="#join" aria-controls="join" role="tab" data-toggle="tab"><button type="button" class="btn btn-primary clickme">next</button></a> 

i using next button move next tab. tab changing, active stands in first tab of nav tab. how change active first selected tab?

fire event on button click

$('.clickme').click(function(){   $('.nav-tabs > .active').next('li').find('a').trigger('click'); }); 

Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -