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! While you're at it, check out some resources Treehouse students have shared here.

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

JavaScript

Konrad Pilch
Konrad Pilch
2,435 Points

How to clone menu when scrolling?

HI,

Im trying to do this effect with jQuery.

And this is what i got.

So when i scroll, after 550px, i clone the menu and i get it to position fixed.

1 Answer

Billy Bellchambers
Billy Bellchambers
21,689 Points

I did something similar to this on my site.

There is no need to clone the navigation I just amended the posiiton property after a certain scroll value.

The method I used is explained here.

Hope that helps happy coding

Konrad Pilch
Konrad Pilch
2,435 Points

Thank you :D But im practicing to clone :D Because the one you send me i did one similar as well, but now i just need to clone it because of the practice. Im new to it so i want to put lots of practice in it by building lots of rnadom things i can think of, and using few things like clone, append, push etc..