Line 85: | Line 85: | ||
<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script> | <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script> | ||
<script type='text/javascript' src="https://2018.igem.org/wiki/index.php?title=Template:XJTU-China/jquery.waypoints.min.js&action=raw&ctype=text/javascript"></script> | <script type='text/javascript' src="https://2018.igem.org/wiki/index.php?title=Template:XJTU-China/jquery.waypoints.min.js&action=raw&ctype=text/javascript"></script> | ||
+ | <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> | ||
<script> | <script> | ||
$(document).ready(function(){ | $(document).ready(function(){ | ||
Line 98: | Line 99: | ||
console.log('scoll to the top'); | console.log('scoll to the top'); | ||
}); | }); | ||
− | } else if ($(this).scrollTop() != 0 | + | } else if ($(this).scrollTop() != 0 && $('header').data('expend') != 'false') { |
− | + | $(function() { | |
− | + | $('.navbar-header').clearQueue().animate({top: '0'}, 400, 'linear'); | |
− | + | $('.navbar').clearQueue().animate({opacity: '1'}, 400, 'linear'); | |
− | + | $('#top-nav .nav-link').clearQueue().animate({lineHeight: '54px'}, 400, 'linear'); | |
− | + | $('header').data('expend', 'false'); | |
− | + | ||
}); | }); | ||
− | |||
} | } | ||
}); | }); |
Revision as of 07:20, 14 October 2018