Difference between revisions of "Team:XJTLU-CHINA/js/main"

(Blanked the page)
Line 1: Line 1:
// Offset for Main Navigation
 
$('#mainNav').affix({
 
    offset: {
 
        top: 100
 
    }
 
})
 
  
// jQuery to collapse the navbar on scroll
 
function collapseNavbar() {
 
    if ($(".navbar").offset().top > 50) {
 
        $(".navbar-fixed-top").addClass("top-nav-collapse");
 
    } else {
 
        $(".navbar-fixed-top").removeClass("top-nav-collapse");
 
    }
 
}
 
 
$(window).scroll(collapseNavbar);
 
$(document).ready(collapseNavbar);
 
 
// Closes the Responsive Menu on Menu Item Click
 
$('.navbar-collapse ul li a').click(function() {
 
    $(this).closest('.collapse').collapse('toggle');
 
});
 

Revision as of 07:16, 13 October 2016