Skip to content

thesamplepg/ClassToggler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Class Toggler

A javascript library that adds a class to the DOM element when the scroll comes to it.

Installation

  • You can donwload or copy this repo and retrive library from dest folder.
<script src="https://afiles.herokuapp.com/ClassToggler"></script>
  • Or just put this line of code in the bottom of your HTML.

Usage

  • Add "data-toggler" attribute to the DOM.
    <div data-toggler="fadeIn"></div>
  • The result when scroll comes to it.
    <div class="fadeIn" data-toggler="fadeIn"><div>
  • You can add some delay.
    <div data-toggler="fadeIn" data-togger-delay="2"></div>

About

A javascript library that adds a class to the DOM element when the scroll comes to it.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors