JavaScript/JQuery: $(window).resize how to fire AFTER the resize is completed?

前端 未结 12 930
终归单人心
终归单人心 2020-11-22 08:54

I\'m using JQuery as such:

$(window).resize(function() { ... });

However, it appears that if the person manually resizes their browser wind

12条回答
  •  无人共我
    2020-11-22 09:29

    If you have Underscore.js installed, you could:

    $(window).resize(_.debounce(function(){
        alert("Resized");
    },500));
    

提交回复
热议问题