Hi all
I’ve been using a tabbing system for some time, works good.
What I need now is as an extra bit of functionality so I can click links anywhere on the page, not just the tabs and open the selected tab based on the ID.
I’ve started with the below js snippet though nothing is happening.
Is this the correct way to do things, how should I code this, any suggestions what I might be doing wrong?
I’ve minimised for viewing.
$("#gotoreview").click(function() {
$("ul.tabs li").tabs({active: "#addReview"});
});
<a id="gotoreview">open up tab</a>
<div>
<ul class="tabs">
<li><a href="#userReviews" title="">reviews</a></li>
<li><a href="#addReview" title="">write a review</a></li>
</ul>
</div>
<div class="tab_container">
<div id="userReviews" class="tab_content">
<h3>latest reviews</h3>
</div>
<div id="addReview" class="tab_content">
<h3>share your comments</h3>
</div>
</div>
Thanks, Barry