jQuery的动画没有在Android 4.0的工作 [英] jQuery animate is not working in Android 4.0

查看:155
本文介绍了jQuery的动画没有在Android 4.0的工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Twitter的引导,jQuery和PhoneGap的在我的申请。

I'm using twitter bootstrap, jquery and phonegap in my application.

我有溢出一个div:滚动和两个按钮通过它来浏览:

I have a div with overflow:scroll and two buttons to navigate through it:

    <a href="#" id="left-button" style="float: left;"><i class="icon-chevron-left"></i></a>
    <a href="#" id="right-button" style="float: right;"><i class="icon-chevron-right"></i></a>
    <div id="content" style="overflow: scroll; white-space: nowrap;">
        <img src="img/bandera.jpg" class="img-rounded">
        <img src="img/arbol.jpg" class="img-rounded">
    </div>

我的下一个jQuery脚本使用的按钮:

I have the next jquery script to use the buttons:

   $('#right-button').click(function(){
       $('#content').animate({
           scrollLeft: '+=200px'
       }, 600 );
     });
   $('#left-button').click(function(){
       $('#content').animate({
           scrollLeft: '-=200px'
       }, 600 );
     });

不过,我有一个问题。按钮在Firefox,Chrome和即使在IE浏览器在我的桌面上的罚款,并在Android 2.2的正常工作

But I have a problem. The buttons works fine in Firefox, Chrome and even in IE in my desktop, and works fine in Android 2.2

但由于某些原因,在Android 4.0的按键无可奈何。

But for some reason, in Android 4.0 the buttons do nothing.

推荐答案

尝试jQuery的-1.9.1.js,
我有与Android 2.3.6设备上的jQuery-1.8.2.js同样的问题。
我终于升级到jQuery的-1.9.1.js解决它。

Try jquery-1.9.1.js, I have the same issue with the jquery-1.8.2.js on Android 2.3.6 device. I finally resolved it by upgrading to jquery-1.9.1.js.

http://bugs.jquery.com/ticket/12497

这篇关于jQuery的动画没有在Android 4.0的工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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