解决方法
好的,所以你使用jQuery。所以让我们为它做一个自定义的事件。
(function () { var width = screen.width,height = screen.height; setInterval(function () { if (screen.width !== width || screen.height !== height) { width = screen.width; height = screen.height; $(window).trigger('resolutionchange'); } },50); }());
现在$(window).bind(‘resolutionchange’,fn)应该做你想要的