Skip to content

A simple JS plugin that calls whatever you like when a user's screen hits a position, based on the position of the vertical scroll bar.

Notifications You must be signed in to change notification settings

alexanderlperez/ScrollTrigger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ScrollTrigger

Something for going up, something for going down

A simple JS plugin that calls whatever you like when a user's screen hits a position, based on the position of the vertical scroll bar.

Usage:

ScrollTrigger({
    triggerPosition: 1, // this can be set with $(element).offset() too
    triggerDownCallback: sticky_scroll_down, // triggers when scrolling downwards past trigger position
    triggerUpCallback: sticky_scroll_up // triggers when scrolling upwards past trigger position
});

About

A simple JS plugin that calls whatever you like when a user's screen hits a position, based on the position of the vertical scroll bar.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published