Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript

Christopher Paccione
Christopher Paccione
14,831 Points

Drop-Up Menu?

I'm looking to create a menu that behaves exactly like the menu for the Ferrari website. http://auto.ferrari.com/en_EN/

It's the menu at the bottom of the slider the pulls-up. I found a tutorial on how to create one with pure CSS, but I need to have the sliding animation.

Can anyone point me in the right direction?

Thanks!

3 Answers

you could always use the animate() method.. just select your element that you want to slide up and set the animation parameters: something like this

 $('.element_class').animate({
   height: "200px"
}, 500);

for more info on jQuery animations take a look here: http://api.jquery.com/animate/ keep in mind you'll need to include the jquery library for it to work

also if you ever need more one on one help, feel free to hit me up at https://www.codementor.io/thepulsiphyer

Christopher Paccione
Christopher Paccione
14,831 Points

Wendell,

Thanks for the help. I decided to use a plugin because I had a deadline for the project. The project required a mega-menu that spanned the entire length of the navigation, and which had to animate up and down, because the nav was place in three different sections on the site.

I'll bookmark your link.

Thanks!

Chris

anytime Chris. That animate method can be used just as efficiently than having to download a plugin. Of course, either can be used to the same effect, but the animate method uses less code than a plugin does and you can make it work for your purposes just as easily. it's also easier to customize