开发者

jQuery UI Tabs selected index

开发者 https://www.devze.com 2023-02-11 07:32 出处:网络
I am try开发者_如何学Going to figure out how to solve an issue where I want to select the previously active tab. I have been playing around with cookies to store the tab index.

I am try开发者_如何学Going to figure out how to solve an issue where I want to select the previously active tab. I have been playing around with cookies to store the tab index.

But now my problem is, how can I use the tab index to manipulate content in the specified tab index?

for example what can someone do when you retrieve the selected index?

var $tabs = $('#example').tabs();
var selected = $tabs.tabs('option', 'selected'); // => 0


try this:

var jnode = $('#tabs').tabs("option", "panel");

jnode - jquery object for tab content.

Update:

var $tabs = $('#example').tabs();
var selected = $tabs.tabs('option', 'selected'); // => 0

$('#example').tabs("option", "panel").find('.ui-tabs-panel').eq(selected);
0

精彩评论

暂无评论...
验证码 换一张
取 消