ui tab select using variable
I am having problems when trying to change a tab
The code below is working
$('#tabs').tabs('select', 开发者_JS百科1);
WORKING FINE
The code below
var nextTab=$('#nextTab').val();
$('#tabs').tabs('select', nextTab);
IS NOT WORKING
The nextTab variable is a valid tab index
What am I missing?
Are you sure nextTab holds a valid tab index? If yes, don't know if this makes a difference, but try converting it to a Number:
var nextTab = Number($('#nextTab').val());
精彩评论