Skip to content

ScrollCallback is easy way to watch specific DOM-elements scrolling into and out of view and fires a callback for them.

License

Notifications You must be signed in to change notification settings

pgooood/scrollcallback

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

scrollcallback

ScrollCallback is easy way to watch specific DOM-elements scrolling into and out of view and fires a callback for them.

Demo page

$('.first-element').scrollcallback(function(e, direction){
	alert('You have scrolled to a first element');
});
$('.second-element').scrollcallback({
	inHandler: function(e, direction){
		alert('You have scrolled to a second element');
	},
	outHandler: function(e, direction){
		alert('You have scrolled from a second element');
	}
});
$('.third-element').scrollcallback({
	inHandler: function(e, direction){
		alert('You have scrolled to a third element');
	},
	outHandler: function(e, direction){
		alert('You have scrolled from a third element');
	},
	context: '#context'
});

License

Copyright (c) 2015 Pavel Khoroshkov. Licensed under the MIT license.

About

ScrollCallback is easy way to watch specific DOM-elements scrolling into and out of view and fires a callback for them.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published