views:

28

answers:

1

I tried to reload a particular jQuery UI tab with this code

var currentTab = $("div#tabs").tabs('option', 'selected');
$('div#tabs').tabs('load', currentTab);

and it didn't work, but it works when I change the URI

$('div#tabs').tabs('url', currentTab, 'example_page.html').tabs('load', currentTab);

But the URI of the tabs keep changing (I have buttons that let the user go to another page), so I can't use a pre-determined URI.

I need to know how I can get the URI of a particular tab. I've searched a lot, and found some solutions, some right here on SO, but none of them work. I'm using the latest version of jQuery and jQuery UI, and can't switch to an older version as I need the "Button" UI Widget Plugin

Any help would be appreciated Thanks in Advance

A: 

You can find out the hash of the anchors

$('.jquery-ui-tabs li a').each(function() {

   var hash = this.hash;

});
alex
Thanks a lot, it works!
geeki
Oops, I spoke too soon. It doesn't work if the URI of the tab is changed after it is created.
geeki