Created
March 24, 2015 11:24
-
-
Save matthewbeta/4e037b4d4d911ebf83c7 to your computer and use it in GitHub Desktop.
Resize event debounce from CSS tricks
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
var resizeTimer; | |
$(window).on('resize', function(e) { | |
clearTimeout(resizeTimer); | |
resizeTimer = setTimeout(function() { | |
// Run code here, resizing has "stopped" | |
}, 250); | |
}); | |
//https://css-tricks.com/snippets/jquery/done-resizing-event/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment