jQuery - Window on Resize event


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. function doSomething() {
  2. alert("I'm done resizing for the moment");
  3. };
  4.  
  5. var resizeTimer = null;
  6. $(window).bind('resize', function() {
  7. if (resizeTimer) clearTimeout(resizeTimer);
  8. resizeTimer = setTimeout(doSomething, 100);
  9. });

URL: http://groups.google.com/group/jquery-en/browse_thread/thread/4a00d513c63f5c00

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.