jquery - Easy responsive tabs custom tab activate -
i'm using easy responsive tab link.. here 1st tab active on page load.. want change active tab else other 1st tab.. have following code:
html:
<div id="demotab"> <ul class="resp-tabs-list"> <li> .... </li> <li> .... </li> <li> .... </li> </ul> <div class="resp-tabs-container"> <div> ....... </div> <div> ....... </div> <div> ....... </div> </div> </div>
here demo page. want change order of activated 2nd tab. posiible?
you can dynamically this
<ul class="resp-tabs-list"> <li><a href="#tab1">responsive tab-1</a></li> <li><a href="#tab2">responsive tab-2</a></li> <li><a href="#tab3">responsive tab-3</a></li> </ul>
then need hash url , apply correct class:
javascript
var hash = '#tab1', lis = $("ul.resp-tabs-list > li"); lis.removeclass("resp-tab-active"); $("a[href='" + hash + "']").addclass("resp-tab-active");
js demo: http://jsfiddle.net/hz3f4/5/
Comments
Post a Comment