Jquery 为什么顺序在以编程方式从一个选项卡移动到另一个选项卡时很重要(在1.8.10中是新的)
在我更新到jquery-ui-1.8.10(已经使用jquery 1.5)之前,以下代码已经按预期工作:Jquery 为什么顺序在以编程方式从一个选项卡移动到另一个选项卡时很重要(在1.8.10中是新的),jquery,jquery-ui-tabs,Jquery,Jquery Ui Tabs,在我更新到jquery-ui-1.8.10(已经使用jquery 1.5)之前,以下代码已经按预期工作: case 'baseeditor': $('#tab1').html(responseText).fadeIn(500, function() { ... load the contents of the tab and stuff... }); $("#prolearn").tabs("select",1); break; case ... 该选项卡被添加燃料,然后焦
case 'baseeditor':
$('#tab1').html(responseText).fadeIn(500, function() {
... load the contents of the tab and stuff...
});
$("#prolearn").tabs("select",1);
break;
case ...
该选项卡被添加燃料,然后焦点从tab0(ajax调用从这里开始)移动到tab1
现在,该代码无法工作,但此版本可以:
case 'baseeditor':
$("#prolearn").tabs("select",1);
$('#tab1').html(responseText).fadeIn(500, function() {
... load the contents of the tab and stuff...
});
break;
case ...
有人能解释一下这两者的区别吗?我只是幸运地逃脱了我原来的版本吗
谢谢/Bruce在我发布这篇文章的几天后,jQueryUI 1.8.11发布了。使用这个版本,美元(“#prolearn”).tabs(“select”,1);行的顺序并不重要。因此,对我来说,我最初的问题现在只涉及学术兴趣,但实际上,它已经结束了