onscroll-effect: Toggle CSS Classes When An Element Is Scrolled Into View

onscroll-effect: Toggle CSS Classes When An Element Is Scrolled Into View

A tiny JavaScript library to enable CSS animations when user scrolls.

This library toggles a class to an element when it appears on viewport when user scrolls. It lets you build CSS transitions or animations launched only when user scrolls on it. Only set a few HTML attributes, and code the rest with your CSS skills.

Note that in order to not be JavaScript dependent, as default behavior, this library add the class when the element is outside of the viewport. This way, if you have any JavaScript issue, the default state of your element will appears on scroll.

Sometimes, you may need the opposite behavior, i.e. adding a class when the element is inside the viewport. There is an option for that.

Demo: Link

Download: Link

Fancy you stumbling on my piece of the internet. Bonjour!

My name is Anmol and I'm the Blogger-In-Chief of this joint & working as the Chief Technology Officer at Azoora, Inc. I'm putting up my views here trying to help creative solopreneurs, developers & designers build their business using the power of websites, apps & social media, this, is, my jam.

If you're looking to start your own online business with a professional high quality website or mobile app, just get in touch. I'd be more than happy to assist.

SKYPE | FACEBOOK | LINKEDIN | TWITTER | EMAIL

Leave a Comment

Your email address will not be published.