我知道这个具体的问题是asked before,但是我在jQuery UI Tabs
插件上使用bind()
事件没有得到任何结果.
I just need the index
of the newly selected tab to perform an action when the tab is clicked. bind()
allows me to hook into the select event, but my usual method of getting the currently selected tab does not work. It returns the previously selected tab index, not the new one:
var selectedTab = $("#TabList").tabs().data("selected.tabs");
Here is the code I am attempting to use to get the currently selected tab:
$("#TabList").bind("tabsselect", function(event, ui) {
});
When I use this code, the ui object comes back 100.从文档来看,这应该是我用来使用ui连接到新 Select 的索引的对象.标签.我在最初的tabs()
通话中try 过这个,也try 过它自己.我做错什么了吗?