Reputation: 309
So I'm working on a drop down menu and I'm having a problem. If you hover on it in a certain way, the dropdown menu goes up and down non-stop. Here is the JS:
$("#solar-slide").hover(function() {
$("ul", this).slideDown(100);
},
function() {
$("ul", this).slideUp(100);
}
);
If you'd like to try it yourself, go to mjevange.mysite.syr.edu/SE
Thanks
Upvotes: 0
Views: 69
Reputation: 3099
Try adding stop():
$("#solar-slide").hover(function() {
$("ul", this).stop(true).slideDown(100);
},
function() {
$("ul", this).stop(true).slideUp(100);
}
);
Upvotes: 1
Reputation: 16688
It's because you're moving the menu item on hover. Removing top: 1px;
from your .button:hover
css should fix it.
Upvotes: 0