How can I activate the second tab of my web page in page load, I use the tab jquery and ul Have done
Below is the code
script:
$ (document) .ready (function () {// default action $ (". Tab_content"). Hide (); // Add all content $ ("ul.tabs took: first") AddClass ("active"). Show (); // Activate the first tab $ ("Tab_content: first"). Show (); // Show first tab content // click event $ ("ul.tbs lee"). (Function () {$ ("ul.tabs li"). RemoveClass ("active"); // Any "active" Remove the class $ (this) .addClass ("Active"); // Add the "Active" class to the selected tab $ (". Tab_content") Hide (); // All tab content Activate tAB = $ (this) .find ("a"). Attr ("href") // Find the rel attribute value to identify active tab + content $ (activeTab). FadeIn (); // False false in active material return;});});
I know how to activate the first and the last one, but how can I activate the second and third pages during the page load.
Please help ...
A jQuery selector that matches hash Use it, and click it:
$ ('.tabs li a [href = \ # tab2]'). Click ();
Comments
Post a Comment