Reputation: 27
I have Bootstrap tree at http://www.bootply.com/wxu9KtYSQQ I collapse the whole tre using:
$('ul.tree').hide();
Is that possible to expand one branch of this tree while leaving all other branches collapsed on load? For example, expand BOOTSTRAP/BUTTONS but leave everything else collapsed. Thanks.
I tried putting an extra span class to BOOTSTRAP/BUTTONS but it doesn't work.
$('span.expand').show();
Upvotes: 2
Views: 1576
Reputation: 496
try adding an id
to the ul
tag, and use that to load that tree at the start, like this
<ul id="tree1" class="nav nav-list tree">
and
$('ul#tree1').toggle(200);
Upvotes: 1