How to make Bootstrap 3 Fixed Navbar Collapse on Scroll using jQuery

Check out my other posts and tutorials on Web Development!

Use the following snippet to collapse Bootstrap 3’s fixed navbar when scrolling.

// collapse the navbar on scroll
$(window).scroll(function() {
    if ($(".navbar").offset().top > 50) {
    } else {

Leave a Reply

Contact Us


Subscribe to our blog to receive latest news and tutorials on Web Design, Development, SEO, and more!