[英]jQuery UI Tabs selected index
I am trying 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. 我一直在使用cookie来存储选项卡索引。
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. jnode-选项卡内容的jquery对象。
Update: 更新:
var $tabs = $('#example').tabs();
var selected = $tabs.tabs('option', 'selected'); // => 0
$('#example').tabs("option", "panel").find('.ui-tabs-panel').eq(selected);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.