Skip to content

Instantly share code, notes, and snippets.

@RyoSugimoto
Created April 12, 2014 15:17
Show Gist options
  • Save RyoSugimoto/10540784 to your computer and use it in GitHub Desktop.
Save RyoSugimoto/10540784 to your computer and use it in GitHub Desktop.
ウィンドウのリサイズが終わったときに処理を実行する。
var timer = false;
$(window).resize(function() {
if (timer !== false) {
clearTimeout(timer);
}
timer = setTimeout(function() {
console.log('resized');
// 何らかの処理
}, 200);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment