Advertisement
Guest User

Untitled

a guest
May 22nd, 2015
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.69 KB | None | 0 0
  1.  
  2. // // Scroll-based functionality:
  3.  
  4. // var x = $(window).scrollTop();
  5. // var bg_pos = 0;
  6.  
  7. // $(window).scroll(function(e) {
  8. // e.preventDefault();
  9.  
  10. // // if($(window).width() >= 750) {
  11.  
  12. // // Header Background Parallax:
  13.  
  14. // x = $(this).scrollTop();
  15. // if(x >= 0 && x <= 600) {
  16. // bg_pos = Math.round((x/2)-75);
  17. // $("#main_header").css({"background-position":"center " + bg_pos + "px"});
  18. // } else if(x < 0) {
  19. // $("#main_header").css({"background-position":"center -75px"});
  20. // }
  21.  
  22. // // Header Nav Lock:
  23.  
  24. // var top_pos = $(".logged-in").length ? "65px" : "0";
  25.  
  26. // if(x >= 600) {
  27. // $("#main_menu").css({"position":"fixed", "top":top_pos});
  28. // $("#main_menu .home_link_mobile").fadeIn(300);
  29. // $("#main_content").css({"margin-top":$("#main_menu").css("height")});
  30. // } else {
  31. // $("#main_menu").css({"position":"relative", "top":"0"});
  32. // $("#main_menu .home_link_mobile").hide();
  33. // $("#main_content").css({"margin-top":"0"});
  34. // }
  35. // // }
  36. // });
  37.  
  38.  
  39. // // Mobile Menu
  40.  
  41. // var menu_height = $("#block-menu-block-1").css("height");
  42. // var menu_is_open = false;
  43. // $("#main_menu .menu_toggle").on("click", function() {
  44. // if(x < 600) $("html, body").animate({"scrollTop":"600px"}, 300);
  45. // menu_is_open = menu_is_open ? false : true;
  46. // if(menu_is_open) $(".section_box").hide();
  47. // $("#block-menu-block-1").slideToggle(300, function() { if(!menu_is_open) $(".section_box").fadeIn(300); });
  48. // if($(document).scrollTop() >= 600) {
  49. // var mod = menu_is_open ? "+=" : "-=";
  50. // $("#main_content").animate({"margin-top": mod + menu_height}, 300);
  51. // }
  52. // });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement