I know this is old, but I stumbled on this question as I was trying to solve roughly the same problem, and have come up with a different solution. From what I gather, you want the look and feel of the jQuery tabs, but you want to retain the default browser behaviour of the links in the tab launching other pages. I require similar functionality where I have pages for each tab, each page display the list of tabs, and I just want to link back and forth using the anchor element in the tab, I don't want the jQuery tab to do any Ajax etc.
The following has worked for me.
Given the following html:
<div id="tabs">
<ul>
<li><a href="Page1.html">Page 1</a></li>
<li><a href="Page2.html">Page 2</a></li>
<li><a href="Page3.html">Page 3</a></li>
<li><a href="Page4.html">Page 4</a></li>
</ul>
</div>
Here's the following javascript:
var sUrl = window.location.href;
var $tabs = $("#tabs");
$tabs.tabs({
beforeLoad: function (event, ui)
{
//Prevent the tab loading logic from executing
return false;
}
}).find("li a").each(function ()
{
var $tablink = $(this);
//Remove the click event, which will revert to the browser handling the click, not the jQuery tab javascript
$tablink.unbind('click');
//If the current page url contains the tab href then select it.
if (sUrl.toLowerCase().indexOf($tablink.attr("href").toLowerCase()) > -1)
{
//Get the index of the li element within the ol or ul element.
var index = $tablink.parent().index();
//Select the tab
$tabs.tabs('option', 'active', index);
}
});