Created
June 20, 2017 20:50
-
-
Save chrisjreber/4d2b2376276a244285dd95cbb344c358 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($) { | |
var resizeTimer; // Set resizeTimer to empty so it resets on page load | |
function resizeFunction() { | |
// Add functions here | |
} | |
// On resize, run the function and reset the timeout | |
// 250 is the delay in milliseconds. Change as you see fit. | |
$(window).resize(function() { | |
clearTimeout(resizeTimer); | |
resizeTimer = setTimeout(resizeFunction, 100); | |
}); | |
})(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment