jquery - body scrollLeft with Android 2.x -
i can't make code run android 2.x
$('body').animate({scrollleft:50});
it's working fine android 3/4.
have ever met issue? if so, did find workaround?
i found solution ; use cordova detect android version, workaround not seem compatible android 3+:
css:
body{ position:relative; }
jquery:
var deviceversion = device.version.charat(0); if (deviceversion == "2"){ $('body').animate({left:-50}); // android 2 }else{ $('body').animate({scrollleft:-50}); // android 3+ }
Comments
Post a Comment