Created
August 4, 2016 18:20
-
-
Save ingozoell/5c5fd4e20e32e078a15cd72aa96bd679 to your computer and use it in GitHub Desktop.
Window Resize mit Timeout
From https://www.sitepoint.com/jquery-capture-window-resize-event/
This file contains hidden or 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
$(window).bind('resize', function(e) | |
{ | |
window.resizeEvt; | |
$(window).resize(function() | |
{ | |
clearTimeout(window.resizeEvt); | |
window.resizeEvt = setTimeout(function() | |
{ | |
//code to do after window is resized | |
}, 250); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment