jQuery resize event not firing

前端 未结 7 1532
独厮守ぢ
独厮守ぢ 2021-01-11 09:58

For whatever reason the following:

$(function() {
  $(window).resize(function() {
    alert(\"resized!\");
  });
});

only fires an event wh

7条回答
  •  说谎
    说谎 (楼主)
    2021-01-11 11:00

    try

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

    I think its the document that fires the resize consistently across browsers. But I'm not at work now to check what I usually do.

提交回复
热议问题