Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $( document ).ready(function() {
- // simple as this!
- // NOTE: init() is implicitly called with the plugin
- $("nav#header").headroom({
- "offset": 205,
- "tolerance": 1,
- "classes": {
- "initial": "animated",
- "pinned": "slideDown",
- "unpinned": "slideUp"
- }
- });
- // to destroy
- $(".header").headroom("destroy");
- });
- .headroom--pinned {
- display: block;
- color: #ec008c;
- }
- .headroom--unpinned {
- display: none;
- color: #ec008c;
- }
- .headroom {
- transition: transform 200ms linear;
- }
- .headroom--pinned {
- transform: translateY(0%);
- color: #ec008c;
- }
- .headroom--unpinned {
- transform: translateY(-100%);
- color: #ec008c;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement