I'm using the following component: http://www.jqueryscript.net/menu/Lightweight-Drilldown-Menu-Plugin-with-jQuery-Bootstrap.html
I want to adjust the some built-in functionality: when an item from the lowest level is clicked,
- the menu closes.
- when opened again, the menu goes back to the last level that was accessed, as in the level where the last item was clicked before the menu closes.
I would like to prevent that the menu closes @ event 1. & I would like to jump back to the 'main menu' as in the highest level of the menu.
I know i have to look in the 'bootstrap-drilldown-select.js' file, but could anyone perhaps shine some light on how this code exactly works and where i should put my adjustments?
Thanks in advance!!
Edit 1 For the redirect to main menu (2.): I found out that the difference between a list item which allows a drilldown to a deeper level, has the class 'hasChild' added to it. @'bootstrap-drilldown-select.js' line 107-108. I think that there is an on-click event (somewhere) that checks whether or not the clicked item has a 'hasChild' class. If not, the event defined by 'onSelected' is fired. The only thing I'm still looking for is, where this event is. Any suggestions/help?
Because I couldn't find this event, I thought that I might call the initialize function when the 'onSelected' event is fired. Kinda like line 26-43, or more precies line 35 @ 'bootstrap-drilldown-select.js'. However, I'm not able to reach the function 'makeDropdown' from my external js-file. Any comments/advice on this note?