Tuesday 15 May 2012

jquery menu slide up/down - keeping sub-menus open when not mouse moves away? -


I want to create a horizontal menu that moves the mouse on the main menu and moves the mouse downwards.

The problem is that I still want to show the div under the menu if the mouse moves from one menu item to another, which contains the submenu.

Here is HTML

    

and here JS

  $ ('menu_it & gt; ul li: is (> div ul)'). ('Mousecenter' ('' '' '' '' '' '' '' '' '' '' '' '' '' '', '': '41'});} ) .on ('mouseleave', function (e) {console.log ('out'); $ (this) .find ('div') SlideUp ('sharp'); $ ('.noti'). Animate ({'Margin-top': '0'});}); I am working here, if I am taking the ID with the ID I have come with LG ID and I can still create a div with class notice.  

If there is smooth sliding for Submuau and a better way below, I would be very grateful.

See this:

  $ ('. Menu_it & gt; Ul li: is (& gt; div ul) '). Animate ('mousecenter', function (e) {$ (this) .find ('div' '(' sharp '); $ ('. Noti ') ({' margin-top ':' 41 '}) ;}) .on ('mouseleave', function (e) {$ (this) () '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' Margin-top ':' 0 '});});   



No comments:

Post a Comment