Bootstrap编码文本覆盖

时间:2012-10-29 00:05:27

标签: javascript text twitter-bootstrap compiler-errors overlapping

我要说我不够聪明,不能把这个搞清楚。我正在使用Twitter的bootstrap的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>

0 个答案:

没有答案