Suppose I want to use more than one menu instance on one page
Changing #dl-menu to a class one is a nobrainer, but menu's that are already open should be closed (or at least be an option)
I fixed this for now by adding a trigger:
...
_initEvents : function(){varself=this;this.$trigger.on('click.dlmenu',function(){if(self.open){self._closeMenu();}else{/*addition*/if(!self.open&&$('.dl-active')[0]){$('.dl-active').trigger('click');}/*end of addition*/self._openMenu();
...
Suppose I want to use more than one menu instance on one page
Changing #dl-menu to a class one is a nobrainer, but menu's that are already open should be closed (or at least be an option)
I fixed this for now by adding a trigger: