Why metisMenu not working processor shown/hidden?

Hello!

There is a menu on the website menu jquery metisMenu. In the menu it is necessary to draw all sorts of widomski (e.g., unread messages). Here is an example. The idea is that if the inside shapotou menu there is only one notification, it is necessary to copy it on shapotou menu. If a lot of them, then display some default text. Now the main problem and the issue. On fiddle normally processed event 'shown.metisMenu' and 'hidden.metisMenu' (the end of the process of disclosure/collapse menu) and run the function redraw uvedomlyaet for chlorotic menu. Hang this function is necessary for these events, not just clicks on the menu (tried it in the beginning), because the function defines schopnosti/deploy menu for a class 'in' for element
  • the menu list. Then the problem starts with the fact that metisMenu.min.js for example, has not worked to the end and not update all parameters and the function works with their old values. That is, the click handler runs before the click callback in the metisMenu. And in principle on the same fiddle everything works exactly as planned. And on the site (unfortunately the link can not give, because he is in a local network is used) these handlers are not triggered. Of course I understand it's hard without seeing the entire code of the website, guess what they break, but can anyone have any ideas? Already pozhogin all the lines of code which I found where somehow something is done with the menu - does not help. Tried preventDefault: false to the constructor Metis transfer menu - doesn't help either. Can anyone have any ideas that might interfere with and break handler?
    P. S. In the example of the most tried to recreate a piece of code that works on the website and is responsible for this functionality.

    Thanks in advance!
June 14th 19 at 18:09
0 answer

Find more questions by tags JavaScriptjQueryUser's navigation