Is there a way to reload the selected tab I know there is the .load() function. But it wants a tab index and I don't seem to see a way to grab the selected tabs id.
A:
To answer the question indicated by the title, you would do:
To get the currently selected index, use the tabs('option','selected')
function.
E.g, if you have a button #button
(and the #tabs
element is made into tabs) where you want to get the index, do the following:
$("#button").click(function() {
var current_index = $("#tabs").tabs("option","selected");
});
Here's a demo: http://jsfiddle.net/sVgAT/
To answer the question indicated by the title, you would do:
var current_index = $("#tabs").tabs("option","selected");
$("#tabs").tabs('load',current_index);
Simen Echholt
2010-08-08 18:38:14
Thanks, that was exactly what I was looking for.
Arimil
2010-08-08 19:12:57