javascript - Jquery menu not working on click -
i can acquire menu working on hover, doesnt work when utilize mousedown:
http://codepen.io/anon/pen/krflq
$(document).ready(function () { $('#nav li').mousedown( function () { $('ul', this).stop().slidedown(100); }, function () { //hide submenu $('ul', this).stop().slideup(100); } ); }); can show me have gone wrong please? want menu open when click top-level , remain open.
use toggle event
$(document).ready(function () { $('#nav li').mousedown(function(){ $('ul #items').toggle(1000); }); }); http://jsfiddle.net/u5brv/
javascript jquery
No comments:
Post a Comment