Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // // Scroll-based functionality:
- // var x = $(window).scrollTop();
- // var bg_pos = 0;
- // $(window).scroll(function(e) {
- // e.preventDefault();
- // // if($(window).width() >= 750) {
- // // Header Background Parallax:
- // x = $(this).scrollTop();
- // if(x >= 0 && x <= 600) {
- // bg_pos = Math.round((x/2)-75);
- // $("#main_header").css({"background-position":"center " + bg_pos + "px"});
- // } else if(x < 0) {
- // $("#main_header").css({"background-position":"center -75px"});
- // }
- // // Header Nav Lock:
- // var top_pos = $(".logged-in").length ? "65px" : "0";
- // if(x >= 600) {
- // $("#main_menu").css({"position":"fixed", "top":top_pos});
- // $("#main_menu .home_link_mobile").fadeIn(300);
- // $("#main_content").css({"margin-top":$("#main_menu").css("height")});
- // } else {
- // $("#main_menu").css({"position":"relative", "top":"0"});
- // $("#main_menu .home_link_mobile").hide();
- // $("#main_content").css({"margin-top":"0"});
- // }
- // // }
- // });
- // // Mobile Menu
- // var menu_height = $("#block-menu-block-1").css("height");
- // var menu_is_open = false;
- // $("#main_menu .menu_toggle").on("click", function() {
- // if(x < 600) $("html, body").animate({"scrollTop":"600px"}, 300);
- // menu_is_open = menu_is_open ? false : true;
- // if(menu_is_open) $(".section_box").hide();
- // $("#block-menu-block-1").slideToggle(300, function() { if(!menu_is_open) $(".section_box").fadeIn(300); });
- // if($(document).scrollTop() >= 600) {
- // var mod = menu_is_open ? "+=" : "-=";
- // $("#main_content").animate({"margin-top": mod + menu_height}, 300);
- // }
- // });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement