jQuery animate mouseover/mouseout keep drop menu visible
Posted
by Ce.
on Stack Overflow
See other posts from Stack Overflow
or by Ce.
Published on 2010-04-10T00:31:15Z
Indexed on
2010/04/10
0:33 UTC
Read the original article
Hit count: 796
I'm trying to make a basic drop down menu with animate and am running into the issue where I can't seem to figure out how to keep the dropdown part open until the mouse leaves. Is there an easy way to tell this to stay open? I know what I have is completely wrong regarding the .clickme mouseout function since it will unload the menu accordingly.
If anyone can help in this specific instance, I would be super grateful.
PREVIEW HERE http://cu3ed.com/ddmenu/
or below:
$(document).ready(function() {
$('.clickme').mouseover(function() {
$('#slidebox').animate({
top: '+=160'
}, 200, 'easeOutQuad');
});
$('.clickme').mouseout(function(){
$('#slidebox').animate({
top: '-=160'
}, 200, 'easeOutQuad')
});
});
I would like to keep this as simple and clean as possible. I know the CSS is all crazy but it's totally preliminary.
THANKS!!!
© Stack Overflow or respective owner