How to set the last tab default in jquery Ul tabs? -


i use tutorial tabs.

need set last tab active default

anyone can ?

unless have specific reasons stick code (which in opinion pretty convoluted) i'd use code that's show on jqueryui homepage. basically, html tabs like

<div id="tabs">   <ul>     <li><a href="#tabs-1">t1</a></li>     <li><a href="#tabs-2">t2</a></li>     <li><a href="#tabs-3">t3</a></li>   </ul>   <div id="tabs-1">     <p>...</p>   </div>   <div id="tabs-2">     <p>...</p>   </div>   <div id="tabs-3">     <p>...</p>   </div> </div> 

and activating last tabs become simple, see documentation: negative value selects panels going backward last panel.:

  $(function() {     $( "#tabs" ).tabs(        {         active: -1      }     );   }); 

you see how little code needed?


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -