I thought of 2 different methods to approaching this, but I need assistance.
- Scroll to section and then stick.
- Hide element while scrolling, then unhide element once you have reached point on page.
How can I do this?
I'm using stickyjs currently.
But I don't see a feature for doing what I asked.
demo - http://jsfiddle.net/m6q6j8xL/3/
this is custom js
in this demo the header changes to green(
fixed
) and when you reach to bluediv
changes back tonormal
and when u are out from the blue div it changes back tofixed
padding is added to div so that it doesn't effect window scroll when changed to fixed
you can use jquery-waypoints plugin for this.
Demo