javascript - jQuery dropdown menu with css -
i've made bit lists , think i'm lost them when comes jquery , making menu toggle on click event.
here have: http://jsfiddle.net/3rc63e3l/
the problem in menu. when mouse hovering element, showing , when click - hides. when i'm deleting css
ol > li:hover > ul { display: block; }
it won't work while clicking on menu2 tab. idea delete "hover" thing on menu2 , make work "click". how can fix it?
you’re trying toggle list elements instead of list itself. use following javascript:
$('ol li.submenuone').click(function() { $('ol li.submenuone ul').toggle(); });
and remove css above.
demo: jsfiddle
Comments
Post a Comment