-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Getting Started (v3.x)
Julian Lloyd edited this page Aug 6, 2018
·
1 revision
The simplest method is to copy paste this snippet just before your closing </body>
tag.
<script src="https://unpkg.com/scrollreveal/dist/scrollreveal.min.js"></script>
But you can also:
- Download ZIP
npm install scrollreveal
bower install scrollreveal
The reveal()
method is the primary API, and makes it easy to create and manage various types of animations.
<!-- HTML -->
<div class="foo"> Foo </div>
<div class="bar"> Bar </div>
// JavaScript
window.sr = ScrollReveal();
sr.reveal('.foo');
sr.reveal('.bar');