Skip to content

A jQuery plugin that animate elements with the scroll event using CSS3 animations

License

Notifications You must be signed in to change notification settings

SiroDiaz/scroll-animate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

scroll-animate

A jQuery plugin that animate elements with the scroll event using CSS3 animations

Usage

Include your CSS animation classes in your .css file. For example you can use animate.css as animation library.

<link rel="stylesheet" href="/dist/animate.css">

Include jQuery and the scroll-animate at the end of the body tag and initialize the plugin for every data-animate elements.

<div style="margin-top: 1200px;">
    <h1 data-animate="fadeInUp"><strong>Titulo uno</strong></h1>
</div>
<div style="margin-top: 20px;">
    <h1 data-animate="fadeInUp"><strong>Titulo uno</strong></h1>
</div>
<div style="margin-top: 20px;">
    <div data-animate="fadeInUp">
        <h1><strong>Titulo uno</strong></h1>
        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nostrum doloremque ratione, voluptates quae sint nam aliquam explicabo dolore fugiat earum eveniet temporibus quasi voluptatem, cumque molestiae, aspernatur qui ullam autem?</p>
    </div>
</div>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.3/jquery.min.js"></script>
<script src="/path/to/jquery.scroll-animate.js"></script>
<script>
    $('[data-animate]').scrollAnimate({startAnimation: 'animated'});
</script>

Use data-animate="animationName" to select the animation or animations that you want to be execute. The only one property that you can set in settings is startAnimation that is by default animated(from animate.css) and defines the CSS class that will start the animation.

About

A jQuery plugin that animate elements with the scroll event using CSS3 animations

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published