I need to avoid the collapse of jquery treeview on click of treeview links/text.
For example, if i am showing a list of directories/subdirectories in treeview, I need to collapse the treeview only while clicking the +/- image and not on clicking the directories
You’ll need to update the treeview javascript code itself. For Treeview 1.4, comment out the following lines (66-68):
This will ensure expand/collapse only occurs on the +/- click. The expand all and collapse all feature will continue to work as well, if applicable.
Better yet, you provide a new argument when defining the tree and only if the condition is satisfied do you override the default functionality. For example,
And your treeview definition might look like this:
Hopefully you get the idea. Good luck.