Skip to content

Simple JS library for adding class to elements on scroll

Notifications You must be signed in to change notification settings

kryptondv/add-class-on-scroll

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

add-class-on-scroll

Simple library for adding class to elements on scroll

Usage

To select DOM elements use the AddElements() function. It takes three arguments:

addElements(classToSelect, classToAdd, offset);

classToSelect

name of the class of elements you want to select (string)

classToAdd

name of the class you want to add (string)

offset

determines number of pixels from the element to the top of the window at which you want the class to be added


aclos()

put the aclos() function at the end of your script

and that's it:)

About

Simple JS library for adding class to elements on scroll

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published