Reputation: 3484
I can't make this code run with Android 2.x
$('body').animate({scrollLeft:50});
It's working fine with Android 3/4.
Have your ever met this issue? If so, did you find a workaround?
Upvotes: 2
Views: 261
Reputation: 3484
I finally found a solution ; I use Cordova to detect the Android version, as the workaround does not seem to be compatible with 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+
}
Upvotes: 1