【问题标题】:Sticky animation not working properly in Safari/Chrome粘性动画在 Safari/Chrome 中无法正常工作
【发布时间】:2013-07-01 02:44:18
【问题描述】:

如果您在 Firefox 中对此进行测试,无论是通过滚动还是单击文本框,一切正常,但在我列出的其他浏览器中,文本框会在动画开始前跳到底部。

不确定是什么原因导致这种情况发生或如何解决,有什么想法吗?

http://coreytegeler.com/gl/

function stickyStuff(){
var half_height = $(window).height()/2+8;
$('#check1').sticky({
    'offset'  : half_height,
    'mode'   : 'animate',
    'speed' : 500,
    'onStick' : function() { 
    $('#front-title-wrap').animate({ 'top': '50px' }); 
    }
});
$('#check2').sticky({
    'offset'  : 55,
    'onStick' : function() { 
    $('#front-nav-wrapper').css({'position' : 'fixed','top': '55px', 'opacity' : '1' }); 
    }
});

【问题讨论】:

    标签: javascript jquery jquery-animate sticky


    【解决方案1】:

    不确定是否会导致问题,您包含两次相同的粘性 js 文件。普通版和最低版。

    删除一个并重新测试?

    你的脚本

    <script type="text/javascript" language="javascript" src="http://coreytegeler.com/gl/js/jquery.sticky.js"></script>
    <script type="text/javascript" language="javascript" src="http://coreytegeler.com/gl/js/jquery.sticky.min.js"></script>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-03-13
      • 2012-01-17
      • 2013-08-27
      • 2019-09-04
      • 1970-01-01
      • 2015-11-14
      • 2011-07-17
      • 2011-11-09
      相关资源
      最近更新 更多