In general, there are pages with this menu on jQuery . For some reason, everything is fine on one page, and on the second when the menu is opened, it automatically collapses.

Here is the page where it works correctly. But where is not correct.

If you have time to click on any category from the drop-down list, it is displayed normally on a new page. Here is an example .

What is the reason for this behavior and how is it possible to correct?

  • That's why it is better to perform js in a separate file, and not by the HTML code. - markuper

1 answer 1

A click event is hung twice on the menu item. Those. for some reason, function toggler() is called for some reason. Now I am looking for the reason.

  • one
    you call $ ("# tree") twice. treeview (. right before the menu itself and immediately after <! - content -> - CrazyTimon
  • Thank you very much))) Otherwise, I still could not find a bug))) - Demyan112rv