jquery-scrolla.js---a jQuery plugin for reveal animations when scrolling
jQuery-scrolla.js is a jQuery animations when scrolling,which is based on animate.css .
GitHub here
Step1:
link the animate.css in the head
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css">
head |
link the jQuery and scrolla.js at the bottom of body
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>Step2:
<script type="text/javascript" src="js/scrolla.jquery.min.js"></script>
html |
The method of this plugin is to add each item which you want to animate a class name and other attributes.
data-animate: the animation name according to animate.css pluginStep3:
data-duuration: the time animation can be lasted
data-delay: the time animation delay from beginning
Call scrolla
js |
$('.animate').scrolla({
mobile: false, // disable animation on mobiles
once: false // only once animation play on scroll
});