【问题标题】:Jquery script stopped working correctly in ChromeJquery 脚本在 Chrome 中停止正常工作
【发布时间】:2014-12-11 09:37:48
【问题描述】:

问题如下: 脚本突然停止在 Google Chrome 中运行。然而,在 IE 中一切正常。 看网站:agenceinteractive.com 当您向下滚动时,一切都流畅而漂亮,但当您向上移动时,页面是不可见的抽搐和平滑过渡。从右向左移动时也是如此。

就在 2-3 周前,一切正常。 什么原因,看不懂,Chrome没有更新。

【问题讨论】:

  • 尝试重新安装...;)
  • 您需要发布有问题的代码。发布到生产网站的链接是没有用的——当您解决问题时,问题的未来读者将如何能够看到问题所在?
  • chrome 34.0.1847.116中效果很好
  • 对不起。 Chrome 已更新

标签: jquery google-chrome internet-explorer


【解决方案1】:
// animation top & bottom
  iNewTop = (indexThemeCurrent) * $(window).height();
  iSwipeTop = -iNewTop;
  var iOldTop = oContainer.css('top');
  if (-iNewTop != iOldTop.substr(0, iOldTop.length - 2)) 
  {
    //console.log('déplacement top bottom');
    if(bCss){
        oAbsoluteTheme.css('left', '0px');
        oContainer.css('top','-' + iNewTop + 'px');
    }else{
        //console.log(iSpeedAnimate * Math.abs(indexThemeCurrent - indexThemePrevious));
        // Hide btn nav
    hideNav('all');
    //alert('down');
        oContainer.animate({
            top: '-' + iNewTop + 'px'
          }, 500, 
          function() {
              alert('complete');
          oAbsoluteTheme.css('left', '0px');
          indexSectionPrevious = 0;
          });
    }
 }

问题是,当我们向下移动时,一切正常。但是起来的时候没有动画。跳转到没有动画的幻灯片。

正如我之前所说,问题突然出现(现在我知道更新chrome之后)。在 Chrome 37 中一切正常

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-09-11
    • 1970-01-01
    • 2015-09-09
    • 2011-12-26
    • 1970-01-01
    • 2015-04-04
    • 2012-08-18
    相关资源
    最近更新 更多