JQuery: How to call RESIZE event only once it's FINISHED resizing?

后端 未结 8 1299
一向
一向 2020-11-22 07:29

How do I call a function once the browser windows has FINISHED resizing?

I\'m trying to do it like so, but am having problems. I\'m using the JQuery Resize

8条回答
  •  独厮守ぢ
    2020-11-22 08:05

    jQuery provides an off method to remove event handler

    $(window).resize(function(){
        if(magic == true) {
            $(window).off('resize', arguments.callee);
        }
    });
    

提交回复
热议问题