link to another tab from inside content of another tab
The links are created dynamically so I have to use a class instead of an ID. Here is my code so far. It works going to the first link clicked but doesn't continue afterwords. The second code sample is the HTML portion of my code. Any suggestions would be greatly appreciated.
- var $tabs = $('#tabs').tabs();
var $link = $('a.goTo').attr('href');
$('.goTo').click(function() {
$tabs.tabs('select', $link);
return false;
});
- <div id="tab2">
<p>Second Tab Content</p>
<a href="#tab1" class="goTo">Link</a>
</div>