隐藏所有选项卡的内容jQuery UI选项卡在加载时 [英] Hide all tabs content jQuery UI tabs onload
本文介绍了隐藏所有选项卡的内容jQuery UI选项卡在加载时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
加载页面时是否可以仅加载选项卡?
Is it possible to load just tabs when page is loaded?
示例代码:
仅当我单击某些选项卡时,它才应显示文本. Divs#tab1,#tab2,#tab3应该保持隐藏状态,直到我单击其中一个选项卡为止.
It should only display text if I click on some tab. Divs #tab1, #tab2, #tab3 should remain hidden until I click on one of the tabs.
更新: http://jsfiddle.net/MWtMR/3/
我通过设置可折叠来找到它:的确可以单击,它将关闭该选项卡的内容.如何在页面加载时做出这种行为?
I found it by setting collapsible: it is true that I can click and it will close that tab content. How can I make this behavior on load of the page?
推荐答案
将selected
选项设置为-1
$('#tabvanilla').tabs({ fx: { height: 'toggle', opacity: 'toggle'}, selected: -1 });
更新的小提琴: http://jsfiddle.net/MWtMR/4/
这篇关于隐藏所有选项卡的内容jQuery UI选项卡在加载时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文