手机铬火灾resize事件上滚动 [英] mobile chrome fires resize event on scroll

查看:250
本文介绍了手机铬火灾resize事件上滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是星系S4铬的手机浏览器,安卓4.2.2出于某种原因,我每次滚动页面时,它触发通过图像的缩放比例从jquery.cycle2幻灯片验证resize事件。

I'm using the chrome mobile browser on galaxy s4, android 4.2.2 and for some reason every time I scroll the page down, it fires a resize event verified by the scaling of images from a jquery.cycle2 slideshow.

任何想法,为什么这可能发生?

Any idea why this might be happening?

推荐答案

这听起来很奇怪,但我已经看到它在其他浏览器。您可以解决此像这样。

That sounds strange, but I have seen it in other browsers. You can work around this like so.

var width = $(window).width(), height = $(window).height();

然后在resize事件处理程序,你可以做。

then in your resize event handler you can do.

if($(window).width() != width && $(window).height() != height){
  //Do something
}

我不知道你的职责范围,所有这一切,但你应该从这个获得JIST。

I don't know the scope of your functions and all that, but you should get the jist from this.

这篇关于手机铬火灾resize事件上滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆