The header is fixed when scrolled down. However, when scrolled back up all the way to the top, the header detaches and is unfixed again. How do I maintain a prolonged fixed header?
How do I edit jQuery or CSS code, or can I download a plugin?
Here’s the example I’m basing off of: http://www.chipotle.com/en-US/html/cultivate.html#fnd
The following jQuery should accomplish what you are looking for:
x(which should be changed to a number (i.e. 100, 120, etc)) marks how many pixels from the top you have to be when thedivis set to the fixed class. Once the person goes back abovexpixels, it will be set back to normal, by removing the fixed class.Also,
.stayStillwould represent your navigation bar, or whatever class you want to stall still.Your fixed class should consist of the following CSS: