Template:XJTU-China/Header

$(document).ready(function(){ // header scroll to top animation $(window).scroll(function() { if ($(this).scrollTop() == 0) { $(function() { $('#top-nav .nav-link').clearQueue().animate({lineHeight: '74px'}, 200, 'linear'); $('.navbar').clearQueue().animate({opacity: '0.75'}, 200, 'linear'); $('.navbar-header').clearQueue().animate({top: '10px'}, 200, 'linear'); $('header').data('expend', 'true'); console.log('scoll to the top'); }); } 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'); }); } }); });