Here I made an example of my jsfiddle menu . Thus, I have a horizontal menu with a drop-down list, but I need to - the load on the page limust first be expanded (this is not difficult), and when I hover over any other element, it should display the current expanded content (and if I am mouseleavecurrent item must be expanded).
This is a situation where I am on Item2and mouseleave Item2, it should remain like this:
Item1 Item2 Item3
|||||
subItem2.1 subItem2.2 subItem2.3
UPDATE:
I managed to do this, but with an exception, here is a link to JSFiddle
It works the way I wanted, but when I click on the link Item1or Item2, the function is called init(), and Item1is active again, I need to somehow set the active link - clicked one,
For example, if I clicked a link Item3, it redirects me to the Item3 page, and this link is active in the menu. (all code in JSFiddle )
source
share