Skip to content
This repository was archived by the owner on Jan 1, 2021. It is now read-only.

jamespegg/jQuery-Changed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

#jQuery Changed()

This simply debounces the jQuery resize() event. It doesn't use a timeout, it just checks whether the window actually resized.

I predominately made this to stop Google Chrome firing the event twice. As far as I'm aware this has no ill effects on Firefox, Safari or Internet Explorer 9.

Usage

$(window).changed(function(){
	// Your Code
});

You can also pass on the object directly, like this:

var myFunc = function(){
	// Your Code
}

$(window).changed(myFunc);

About

jQuery function which debounces resize()

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published