How do I hide the tab2? I can add ID to the second li and than hide it with jQuery, but isn't there some way to do it through .tabs directly?
<div id="tabs" style="width:100%">
<ul>
<li>
<a href="#tab1">
Tab 1 Title
</a>
</li>
<li>
<a href="#tab2">
Tab 2 Title
</a>
</li>
</ul>
<div id="tab1" style="width:100%;">
content tab1
....
Try this :
$('[href="#tab2"]').closest('li').hide();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With