$(document).ready(function () {
$('img.menu_class').click(function () {
$('ul.the_menu').slideToggle('medium');
});
$('.img.menu_class').mouseover(function() {
$('ul.the_menu').slideToggle('medium');
});
});
I’ve added this mouseover, but it doesnt work, only if i click.. What have i done wrong?
You should use
mouseenterandmouseleaveinsted ofmouseoverbecausemouseoveris triggered every time the pointer moves into the child element andmouseenteronly when the pointer moves into the bound element.