Found this: https://codepen.io/daveredfern/pen/zBGBJV but couldn’t get it to work in WP

Led me to this: https://www.jqueryscript.net/demo/Scroll-Into-View-Plugin-jQuery-Scrollie/ but that seemed overwhelming

Found this to make $ instead of jQuery work in WP: https://digwp.com/2011/09/using-instead-of-jquery-in-wordpress/ but original script still didn’t work

Found this which was much simpler and didn’t require Animate Colors or Waypoints and allowed me to change on ID: https://stackoverflow.com/questions/22017316/add-class-to-body-for-each-scrolling-based-on-section-id but needed to set body class as “color-” + ID, and also needed to remove only those corresponding body classes. So combined some of the magic from first script, but couldn’t find a way to turn the body back to default color if I scrolled back up to the top

Found this script to do things when at top or bottom of scroll: https://stackoverflow.com/questions/33184101/detect-if-the-user-scrolled-to-the-top-or-the-bottom-of-a-ul/33184215 and used it to return body to default color if user scrolls back up.

Done!

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.

Menu