Advertisement
Guest User

Untitled

a guest
Nov 24th, 2014
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. $( document ).ready(function() {
  2. // simple as this!
  3. // NOTE: init() is implicitly called with the plugin
  4. $("nav#header").headroom({
  5. "offset": 205,
  6. "tolerance": 1,
  7. "classes": {
  8. "initial": "animated",
  9. "pinned": "slideDown",
  10. "unpinned": "slideUp"
  11. }
  12. });
  13.  
  14. // to destroy
  15. $(".header").headroom("destroy");
  16. });
  17.  
  18.  
  19. .headroom--pinned {
  20. display: block;
  21. color: #ec008c;
  22. }
  23. .headroom--unpinned {
  24. display: none;
  25. color: #ec008c;
  26. }
  27. .headroom {
  28. transition: transform 200ms linear;
  29. }
  30. .headroom--pinned {
  31. transform: translateY(0%);
  32. color: #ec008c;
  33. }
  34. .headroom--unpinned {
  35. transform: translateY(-100%);
  36. color: #ec008c;
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement