2

我会说我不够聪明,无法解决这个问题。我正在使用 Twitter 引导程序的 spacelab 版本。我刷新页面的 50% 时间看起来像这样。另一半时间加载正常。这可能是什么原因???http://i.imgur.com/8rhDZ.png

当我禁用 JS 时似乎不会发生。哪个脚本可能是罪魁祸首?

<script>
$(document).scroll(function(){
    // If has not activated (has no attribute "data-top"
    if (!$('.subnav').attr('data-top')) {
        // If already fixed, then do nothing
        if ($('.subnav').hasClass('subnav-fixed')) return;
        // Remember top position
        var offset = $('.subnav').offset()
        $('.subnav').attr('data-top', offset.top);
    }

    if ($('.subnav').attr('data-top') - $('.subnav').outerHeight() <= $(this).scrollTop())
        $('.subnav').addClass('subnav-fixed');
    else
        $('.subnav').removeClass('subnav-fixed');
});

</script>

<!-- Le javascript
================================================== -->


<!-- Placed at the end of the document so the pages load faster -->
<script src="http://bootswatch.com/js/bsa.js"></script>
<script type="text/javascript" src="http://twitter.github.com/bootstrap/assets/js/bootstrap-dropdown.js"></script>
<script type="text/javascript" src="http://twitter.github.com/bootstrap/assets/js/bootstrap.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="http://twitter.github.com/bootstrap/assets/js/bootstrap.min.js"></script>
<script src="http://twitter.github.com/bootstrap/assets/js/application.js"></script>
<script src="http://twitter.github.com/bootstrap/assets/js/bootswatch.js"></script>
4

0 回答 0