directxBOB
asked on
Loading a page into the tab, and selecting the correct tab?
I have a page which contains JQuery tabs (taken straight from the Jquery API)
My JQuery function:
My Page
The problem I am having is that when I click a tab it loads the page but the 1st tab is always selected.
How do I set the index based on the page I've selected
Thanks
My JQuery function:
$(function(){
// Tabs
$('#tabs').tabs({
select: function(event, ui) {
var url = $.data(ui.tab, 'load.tabs');
if( url ) {
location.href = url;
return false;
}
return true;
}
});
});
My Page
<div id="tabs">
<ul>
<li><a href="index.xhtml">Home</a></li>
<li><a href="#tabs-1">Products</a></li>
<li><a href="latest.xhtml">Latest</a></li>
</ul>
<div id="tabs-1">
.... This tabs contents....
</div>
</div>
The problem I am having is that when I click a tab it loads the page but the 1st tab is always selected.
How do I set the index based on the page I've selected
Thanks
ASKER
I've double checked them in all files.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
<div>
</div>
</div>