Site Overlay

Bootstrap affix bug after clicking on body

Hello guys,

Normally Bootstrap below than version 4 there is bug in the affix plugin. When you use affix and you are at the top of page. You just have to click on body and you will see affix toggles. So to fix there here is snippet for that.

$( '.navbar' ).on( 'affix.bs.affix', function(){
    if( !$( window ).scrollTop() ) return false;
} );

Leave a Reply

Your email address will not be published. Required fields are marked *

Copyright © 2022 Dip Codes. All Rights Reserved.