jquery - Event listener for mmenu counter -
i using mmenu plugin building app page. (link - http://mmenu.frebsite.nl/)
on advanced page, (http://mmenu.frebsite.nl/mmenu-3.0.2/docs/examples/advanced.html), if add li
option work colleagues
, hide using inline style display:none
, counter still increases one, isn't ideal.
is there event listener / events can allow this, programatically updating menus , keep correct count.
the plugin count lis (visible or not) not have 1 of these classes:
- mm-label
- mm-subtitle
- mm-noresults
- mm-noresult
the first 3 used plugin visual purposes, fourth (mm-noresult) used hide search results. instead of adding display: none, should add class="mm-noresult".
to update counters, trigger "count" custom event:
$("#menu em").trigger( "count" );
regards, fred
Comments
Post a Comment