Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Fixed header
- headerHeight = $( '.header' ).outerHeight()
- $(window).scroll ->
- if $(this).scrollTop() >= headerHeight
- $( '.main-navigation' ).addClass 'is-fixed'
- $( 'body' ).addClass 'has-fixed-nav'
- else
- $( '.main-navigation' ).removeClass 'is-fixed'
- $( 'body' ).removeClass 'has-fixed-nav'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement