Answer the question
In order to leave comments, you need to log in
Why doesn't shown/hidden handler work in metisMenu?
Hello!
There is a menu on jquery menu site metisMenu. In the menu, you need to draw all sorts of notifications (for example, about unread messages). Here is an example . The idea is that if there is only one notification inside the collapsed menu, then you need to copy it to the collapsed menu itself. If there are many of them, then display some default text. Now the main problem and the crux of the matter. The fiddle normally handles the 'shown.metisMenu' and 'hidden.metisMenu' events (the end of the process of expanding/collapsing the menu) and starts the function of redrawing notifications for collapsed menus. It is necessary to hang this function on these events, and not just on clicks on the menu (I tried it at the beginning), because the function determines the collapse / expansion of the menu by the presence of the 'in' class for the element
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question