$(window).on("load",function() { resizeCollList(); }); $(window).resize(function() { setTimeout(function () { resizeCollList(); }, 200); });