simonexmachina / jquery-bonsai

Super lightweight jQuery tree plugin
http://simonwade.me/jquery-bonsai
MIT License
148 stars 42 forks source link

Allow for multiple nested `ul` and `ol` lists. #39

Open joshuapinter opened 6 years ago

joshuapinter commented 6 years ago

I had two ul elements inside of a li and bonsai was only recognizing the last one. If you look at line 160, you can see that it sets the subList data value as the last of the subLists and then the other sub lists are ignored with expanded and collapsing.

The change I made fixes the issue but I'm sure you know better if A) there's a better way to solve this or B) what might break with this change.