123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- function hamburgerClickHandler() {
- $("header nav div.hamburger").toggleClass("change");
- $("header nav ul").toggleClass("active");
- }
- $(document).ready(function() {
- var popup = document.getElementById("popup");
- // popup.style.display = "none";
- var firstSlide = document.getElementById("first-slide");
- var secondSlide = document.getElementById("second-slide");
- firstSlide.style.display = "block";
- firstSlide.setAttribute("data-class", "active");
- secondSlide.style.display = "none";
- firstSlide.setAttribute("data-class", "not-active");
- $("#sliderBtn").on("click", function() {
- $("[data-class=active]").fadeOut();
- });
- /* Show POP UP after submit the form */
- var form = $("form");
- form.on("submit", function(event) {
- event.preventDefault();
- // $.ajax({
- // type: "POST",
- // url: "mail.php",
- // data: $(this).serialize()
- // });
- var popup = document.getElementById("popup");
- popup.style.display = "inline-block";
-
- this.reset();
- });
- /* ----------------------- */
- /* POP UP close script */
- var popupBtnClose = $("#popupCloseButton");
- popupBtnClose.on("click", function(){
- var popup = document.getElementById("popup");
- popup.style.display = "none";
- });
- /* ----------------------- */
- /* Скролл из главного меню */
- $("header nav").on("click", "a", function(event) {
- event.preventDefault();
- var id = $(this).attr("href"),
- dest = $(id).offset().top;
- $("body,html").animate({
- scrollTop: dest
- }, 800);
- $("header nav div.hamburger").toggleClass("change");
- $("header nav ul").toggleClass("active");
- });
- /* ----------------------- */
- /* banner ARROW scroll */
- $(".arrow").on("click", function(){
- var id = $(this).attr("href");
- console.log(id);
- var dest = $(id).offset().top;
- $("body,html").animate({
- scrollTop: dest
- }, 400);
- });
- /* ----------------------- */
- /* scrollbtn ARROW scroll */
- $(".scrollbtn").on("click", function() {
- var id = $(this).attr("href");
- console.log(id);
- var dest = $(id).offset().top;
- $("body,html").animate({
- scrollTop: dest
- }, 400)
- });
- });
|