开发者

ui tab select using variable

开发者 https://www.devze.com 2022-12-16 18:43 出处:网络
I am having problems when trying to change a tab The code below is working $(\'#tabs\').tabs(\'select\', 开发者_JS百科1);

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());
0

精彩评论

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