簡易throttle
throttleしょっちゅう使うけどプラグイン使うのも面倒くさいので、
を関数化してみた。
使い方は、
$(window).on('resize', throttle(function(e) { console.log("hoge"); }, 50));
こんな感じ。
素人趣味でやってるWeb制作とかプログラミングとかそっち系の話題についてのブログです。
throttleしょっちゅう使うけどプラグイン使うのも面倒くさいので、
を関数化してみた。
使い方は、
$(window).on('resize', throttle(function(e) { console.log("hoge"); }, 50));
こんな感じ。