Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


Dropdown menus using jquery

I have a question about using jQuery to make a dropdown menu. What I would like to do is make it so that jQuery will display a div when a user hovers over the li which I have gotten to work. The part that I don't understand is this... I would like to make it so that when the user's mouse leaves the dropdown div it will animate the opacity back down to 0, but for some reason the jQuery doesn't recognize it because it has a position of absolute. Is there anyway to fix this issue?

1 Answer

Don't quite understand your answer. Have you tried using display none on your div and using fadeIn and fadeOut functions in JQuery .

I am basically saying that when I change the CSS to a position property of "relative" then the jQuery will recognize a "mouseleave" but when the position property is in absolute it will not recognize the "mouseleave"

I hope I made it a bit more clear

Can you provide a snippet on http://codepen.io/ that will be helpful and we can work on it together.