Skip to content
This repository has been archived by the owner on Nov 20, 2018. It is now read-only.

Latest commit

 

History

History
19 lines (12 loc) · 419 Bytes

README.md

File metadata and controls

19 lines (12 loc) · 419 Bytes

OnScrollClass.js

Adds a class to elements when scrolled into view.

Usage

Just include onscrollclass.min.js in your page:

<script src="onscrollclass.min.js"></script>

Define a class that gets assigned for elements that are scrolled into view using data-onscrollclass:

<div class="foo" data-onscrollclass="bar"></div>

Now, add transitions, animations, etc. in your CSS class .bar.