javascript - What should be the timeout for window resize dragging? -


i have code fires when user has stopped resizing window (by dragging). uses 100ms timeout not fire @ every single window resize event. i'd find balance between swiftness , unnecessary runs of code heavy. user experience standpoint, how many ms should set to?

var resizeto = false; $(window).resize(function(){     if(resizeto !== false){         cleartimeout(resizeto);     }     resizeto = settimeout(function(){         // code     }, 100);  }); 


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -