如何使用Jquery UI设置默认选项卡 [英] How to set a default tab with Jquery UI
本文介绍了如何使用Jquery UI设置默认选项卡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在将Jquery和Jquery UI用于以下内容:
I'm using Jquery and Jquery UI with the following:
$(document).ready(function() {
$('#tabvanilla > ul').tabs({ fx: { height: 'toggle', opacity: 'toggle' } });
});
现在,它会自动将第一个标签页设置为文档加载时选择的默认标签页.页面加载后,如何覆盖此选项并将第二个选项卡设置为默认选择的选项卡?
Right now it automatically sets the first tabs as the default tab that is selected when the document loads. How do I override this and make the second tab the default selected tab when the page loads?
推荐答案
$('#tabvanilla > ul').tabs({ selected: 1 });
规范页面上的更多详细信息.
这篇关于如何使用Jquery UI设置默认选项卡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文