How to load URL directly when a tab is selected?
I have a set of tabs where the href is the URL I would like to load when the tab is selected.
Following the docs I added the following select option.
$('#example').tabs({
select: function(event, ui) {
var url = $.data(ui.tab, 'load.tabs');
if( url ) {
location.href = url;
return false;
}
return true;
}
});
in a <script> tag in the top of each page (ASP.NET master page).
The page loads, but the tab is never selected visually, i.e., the first tab is always selected even though say tab #3 content is displayed.
In tracing the script above in FireBug, once the location.href=url is executed the new page loads and the return statements are never executed. Is this a problem?
Thanks
Chris