Reputation: 5386
I have tree in my shop. I need when i go trough some good i need open exactly that branch that contain my good.
<ul id="treeview" class="treeview-black">
<li>Item 1</li>
<li>
<span>Item 2</span>
<ul>
<li>
<span>Item 2.1</span>
<ul>
<li>Item 2.1.1</li>
<li>Item 2.1.2</li>
</ul>
</li>
<li>Item 2.2</li>
<li>
<span>Item 2.3 (closed at start)</span>
<ul>
<li>Item 2.3.1</li>
<li>Item 2.3.2</li>
</ul>
</li>
</ul>
</li>
</ul>
$("#treeview").treeview({
animated: "fast",
collapsed: true,
unique: true,
persist: "location"
});
I need open some branch when page will be open and do this with JavaScript code. Thanks in advance.
Upvotes: 0
Views: 141