Mobile Chrome fires resize event on scroll

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();

then in your resize event handler you can do.

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

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

Leave a Comment