istvan-ujjmeszaros / bootstrap-autohidingnavbar

An extension for Bootstrap's fixed navbar which hides the navbar while the page is scrolling downwards and shows it the other way.
Other
321 stars 106 forks source link

Trigger events when navbar is hidden or shown #17

Closed mariavilaro closed 8 years ago

mariavilaro commented 9 years ago

A hide event is fired after hiding the navbar, and a show event is fired after showing it. You can then add the custom handlers like this:

    $(document).on('show.autoHidingNavbar',function(){
        console.log('hello');
    });

Or like this:

    $('.navbar-fixed').on('hide.autoHidingNavbar',function(){
        console.log('bye');
    });

I decided to use 'autoHidingNavbar' namespace but feel free to change it to whatever you think is best!

vladimirnani commented 8 years ago

Good job, waiting for merge :) @istvan-ujjmeszaros