Reputation: 2943
Is it possible to load just tabs when page is loaded?
Sample code:
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.
Update: 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?
Upvotes: 0
Views: 3997
Reputation: 11
Update
Since jQuery UI 1.10, you'll have to use parameter active
instead of selected
.
$('#tabvanilla').tabs({ active: false, collapsible: true });
See http://api.jqueryui.com/tabs/#option-active for details.
Upvotes: 1
Reputation: 27637
Set the selected
option to -1
$('#tabvanilla').tabs({ fx: { height: 'toggle', opacity: 'toggle'}, selected: -1 });
Updated fiddle: http://jsfiddle.net/MWtMR/4/
Upvotes: 2