I have jQuery UI tabs on my page, but I would like to use them as a navigation between the pages and not like showing and hiding divs as it was designed to. So basically I still want to use jQuery UI tabs but for global navigation and the correct highlighting.
Anyone could help me with this?
I can navigate already, but I’m still kinda stuck on highlighting the correct item in the following page. Any ideas how to achieve that?
$(document).ready(function() {
var iSelectedTab = $('div#tabs ul a').filter('a[href="#"]');
$("#tabs").tabs({
selected: iSelectedTab,
select: function (e, ui) {
window.location.href=ui.tab.href;
}
});
});
But it isn’t working. Any ideas?
I don’t see the point of using the Tabs in this case…but to answer your question…
Say that we are in page1.html – for which you need tabs-0 to be active, your tabs structure should be like this (yes – it will not respect the standard structure of Jquery UI tabs):
Note that there is no other tab containers in this page. page2.html would have the same structure as above
At this point, you don’t need any special JS code,