I am using jquery tab plugin.
I would like to link content inside tab 1 to go to tab 3 instead of clicking tab 3 to go to it. How to do it?
@redsquare ... So, I changed it based on your assumption that I can get all tabs to interact with each other. This change works, thanks again, so I think I'm wondering if there is a better way to write this or is this the best way?
Demo with the latest changes: http://jsbin.com/etoku3/
<script type="text/javascript">
$(document).ready(function() {
var $tabs = $("#container-1").tabs();
$('a.tab1').click(function(){$tabs.tabs('select', 0);});
$('a.tab2').click(function(){$tabs.tabs('select', 1);});
$('a.tab3').click(function(){$tabs.tabs('select', 2);});
$('a.tab4').click(function(){$tabs.tabs('select', 3);});
$('a.tab5').click(function(){$tabs.tabs('select', 4);});
});
</script>
Evan source
share