Skip to content

Simple jq plugin to execute a function whenever you scroll through a necessary page element

License

Notifications You must be signed in to change notification settings

rsharpe23/jquery-waypoint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jquery-waypoint

Simple jq plugin to execute a function whenever you scroll through a necessary page element

Usage

Include

<script src="jquery.waypoint.min.js"></script>

jQuery

$('.someElement').waypoint({
  onEnter: function () {
    console.log('enter!');
  },
  
  onExit: function () {
    console.log('exit!');
  },
  
  onActive: function () {
    console.log('active!');
  },
  
  onDeactive: function () {
    console.log('deactive!');
  }
});

or with extra parameters

$('.someElement').waypoint({
  once: true,
  offset: 50,

  onEnter: function () {
    console.log('enter!');
  }
});

About

Simple jq plugin to execute a function whenever you scroll through a necessary page element

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published