Created
March 19, 2015 19:16
-
-
Save dustintheweb/87a6901d5c9bb73dd5ac to your computer and use it in GitHub Desktop.
Headroom Smart Offset
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// -- headroom --------------- | |
(function($) { | |
var headOffset = (app.obj.$section.filter('.feature').height() / 2) - (app.obj.$header.height()); | |
app.obj.$header.headroom({ | |
'offset': headOffset, | |
'tolerance': 5, | |
'classes': { | |
'initial': 'animated', | |
'pinned': 'slideDown', | |
'unpinned': 'slideUp' | |
} | |
}); | |
})(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment