Skip to content
adds events for when expensive evnts (like scroll and resize) have ended
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.project
LICENSE
README.md
bower.json
endedEvents.js
endedEvents.min.js

README.md

endedEvents

adds events for when expensive evnts (like scroll and resize) have ended. Demo @ http://beechbot.com/demos/endedEvents/

Requirements

Usage

  • add the js
  • init like : endedEvents.init();
  • or - fancy like setting the throttle* endedEvents.init(50);
  • or - real fancy like endedEvents.init(50, $jquery); (to pass a specific version of jQuery)
  • we are defined as 'endedEvents' for AMD

###* throttle

  • how often the timers are run in milliseconds.
  • lower numbers are run more frequently, but this is obviously more expensive.
  • defaults to 150

with JQuery

  • if you have jquery in scope, or you pass it to the init ....
  • you'll get some new events : 'scrollStopped', 'resizeStopped'
  • so you can use them like :
	$("#thing").on('scrollStopped', function(){
		// your function here ...
	});
You can’t perform that action at this time.