jQuery resize event not firing

前端 未结 7 1535
独厮守ぢ
独厮守ぢ 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:01

    Try this code.

    window.addEventListener("resize", function(){
        console.log('yeap worked for me!');
    })
    
    0 讨论(0)
提交回复
热议问题