i have 2 different tabs setup on the page: tabs1 and开发者_JAVA百科 tabs2 i have this set up:
$( '#tabs1' ).tabs({
select: function(event, ui) {
var theSelectedTab = ui.index;
if (theSelectedTab == 0) {
..do something
}
});
what i want to do is to add another var for the same ui.index"
$( '#tabs2' ).tabs({
select: function(event, ui) {
var theSelectedTab1 = ui.index;
if (theSelectedTab1 == 0) {
..do something
}
});
but it looks like var theSelectedTab = ui.index;
is conflicting with var theSelectedTab1 = ui.index;
how can i separate them?
thanks
I corrected your code and you can find the complete solution here : http://jsfiddle.net/Ngetw/
I think that the error comes from a missing bracket (}
) that should close the select: function(event, ui) {
line.
Regards.
精彩评论