I am a total newbie when it comes down to Jquery, still in the learning process.
$(document).ready(function(){ $('#top-bar-login li.current').hover( function() { $("#top-bar-login ul").css('display', 'block'); }, function() { $("#top-bar-login ul").css('display', 'none'); }); }); I created a simple "hover to show menu" But instead of the hover function, I want to activate the function on click. $(document).ready(function(){ $('#top-bar-login li.current').click( function() { $("#top-bar-login ul").css('display', 'block'); }, function() { $("#top-bar-login ul").css('display', 'none'); }); }); Now the code doesn't work. Where is the problem?