jquery - Android - Chrome SlideToggle closing on scroll -


i have simple jquery slidetoggle activated on button click. notice on google chrome on htc 1 m8 (probably chrome issue on android in general) opened or 'toggled' div automatically close when stop scrolling. kind of feature or bug?

 var jq = jquery;  //page resize hide & show jq(window).resize(function() { var width = jq(window).width();     newwidth = jq(window).width();     if ( newwidth >= 980 ) {         //     } else {         //     }; }); 

this issue stems mobile chrome resize event fires on scroll. own solution below:

var jq = jquery;  jq(window).load(function(){    widthhorz = jq(window).width(); });  //page resize hide & show jq(window).resize(function() {     if ( widthhorz != jq(window).width() ) {         var newwidth = jq(window).width();         if ( newwidth >= 980 ) {             //         } else {             //         };     }; }); 

Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -