Okay, figured it out: $nav = $(".mainNav ul").tabs({ // set url hash to selected tab select: function(event, ui){ document.location.hash = "t" + $(ui.panel).attr("id"); } }); // go to tab set in url $nav.tabs('select', document.location.hash.slice(2));
This will allow users to bookmark or refresh the page and it will load the correct tab. We set the hash to the selected tab WITH a prefix (anything will do -- I just used "t") so the browser doesn't recognize the id and won't attempt to scroll. And on load of the page, I set the tabs to the hash minus first two characters ("#" and "t"). So now hash gets set and user can refresh and bookmark. Now if we could get history to work... I'll think about it, or I should just try the history plugin. On Jun 4, 2:10 pm, Apfel007 <ravesl...@gmx.net> wrote: > Hi, my first posting in this group. Hope someone can give me a hint. > > Is it right, that there is no hash sended to the url in jquery "TABS > 3" by default ? means the hash is not visible in the url? I'm new on > this stuff ... > > I've read that I can send the hash with this to url.. select: function > (event,..... > > .tabs({ selectedClass: 'active', select: function(event, ui) > { window.location = ui.tab.href; }, cookie: { expires: 0}, fx: fx }) > > this will send the hash to url, but add it like this mysite#hash AND > the worst thing is, that the tab content is not changing anymore.. > Could someone help my to fix this... > Add the hash as an url-segment like this mysite/#hash > > Thanks