Skip to content

PhilippBaranovskiy/js-client-window-resizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

js-client-window-resizer

It uses delayed window.resize listener (with setTimeout). Bind your listeners to the only one delayed-"resize" event instead of copying that code.

Add your listener (and get an ID key):

var callbackID = windowResizer.queue.add( yourFunc, force );

yourFunc: function, callback runs after last event
force: true/false, to run your callback right now after adding to the queue.

Remove your listener by ID key (and get boolean result):

var removedORnot = windowResizer.queue.remove( callbackID );

About

… with queue and add/remove methods.

Resources

License

Stars

Watchers

Forks

Packages

No packages published