Created
December 11, 2013 20:32
-
-
Save tyrotinal/7917930 to your computer and use it in GitHub Desktop.
jquery: window Resize
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
| var resizeTimer; | |
| $(window).resize(function() { | |
| clearTimeout(resizeTimer); | |
| resizeTimer = setTimeout(function() { | |
| var body_size = $('section').width(); | |
| // ... | |
| // do your work here | |
| // ... | |
| }, 200); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment