|
- /*$('.quickContactbtn').click(function () {
- $(".quickContact").addClass('active');
- });
- $('.quickContactclose').click(function () {
- $(".quickContact").removeClass('active');
- });*/
-
- $(document).ready((e) => {
- // home slider
- $(".ce_sliderStart .slider-wrapper").slick({
- autoplay: true,
- autoplaySpeed: 5000,
- slidesToShow: 1,
- slidesToScroll: 1,
- infinite: true,
- arrows: false,
- dots: true,
- // responsive: [{
- // breakpoint: 1005,
- // settings: {
- // slidesToShow: 1,
- // slidesToScroll: 1
- // }
- // }]
- // , {
- // breakpoint: 992,
- // settings: {
- // slidesToShow: 3,
- // slidesToScroll: 1,
- // arrows: true,
- // }
- // }, {
- // breakpoint: 576,
- // settings: {
- // slidesToShow: 2,
- // slidesToScroll: 1,
- // arrows: true,
- // },
- // }]
- });
-
- // related products
- $(".product-slider .product_list, .mod_iso_relatedproducts .product_list").slick({
- autoplay: false,
- slidesToShow: 3,
- slidesToScroll: 1,
- infinite: true,
- arrows: true,
- dots: false,
- responsive: [{
- breakpoint: 1281,
- settings: {
- slidesToShow: 2,
- slidesToScroll: 1
- }
- }, {
- breakpoint: 769,
- settings: {
- slidesToShow: 1,
- slidesToScroll: 1
- }
- }]
- });
-
- // Product detail product shots
- $(".spwn-image-gallery").slick({
- autoplay: false,
- slidesToShow: 1,
- slidesToScroll: 1,
- infinite: true,
- arrows: false,
- dots: true
- });
-
- // Hide caption of youtube
- $(".ce_youtube .responsive a").on("click", (e) => {
- $("iframe").parents(".video_container").find(".caption").hide();
- });
-
- // Add number to header basket
- $("#header-basket-items").appendTo("header #spwn-main-nav a.isotope-basket, header #spwn-main-nav strong.isotope-basket");
-
- // Mobile navigation
- $(".spwn-nav-icon").on("click", function() {
- $("body").addClass("mobile-nav-open");
- });
- $(".spwn-nav-close").on("click", function() {
- $("body").removeClass("mobile-nav-open");
- });
-
- // FAQ list toggle
- $(".mod_faqlist ul li h3").on("click", function() {
- if ($(this).parents("li").hasClass("open")) {
- $(this).parents("li").find(".answer").slideUp(300);
- $(this).parents("li").removeClass("open");
- } else {
- $(this).parents("li").find(".answer").slideDown(300);
- $(this).parents("li").addClass("open");
- }
- });
-
- // Blog-Detail: Change Position of first video to top and hide img
- let spwnJsImg = $(".spwn-js-img");
- if (spwnJsImg.length && $(".ce_youtube").length) {
- $(".ce_youtube:first").insertAfter(spwnJsImg);
- spwnJsImg.hide();
- }
-
- // Product detail: Add amount
- $(".spwn-add-amount").on("click", function() {
- let amountInput = $(this).parents(".quantity_container").find("input");
- let newAmount = parseInt(amountInput.val()) + 1;
- if (amountInput.val() === "") {
- newAmount = 2;
- }
- amountInput.val(newAmount);
- });
-
- // Product detail: Remove amount
- $(".spwn-remove-amount").on("click", function() {
- let amountInput = $(this).parents(".quantity_container").find("input");
- let newAmount = parseInt(amountInput.val()) - 1;
- if (amountInput.val() <= 1) {
- newAmount = "1";
- }
- amountInput.val(newAmount);
- });
-
- // Move cart voucher box
- $(".mod_iso_coupons h2").prependTo($(".spwn-coupons"));
- $(".mod_iso_coupons").appendTo($(".voucher-box"));
-
- // Hack checkout
- $("<div id='spwn-info-boxes'></div>").insertBefore(".review .clear");
- $(".review .info_container").appendTo($("#spwn-info-boxes"));
- $(".review .info_container .edit").each(function() {
- let h3 = $(this).parents(".info_container").find("h3");
- h3.append("<span class='edit-span'>(<span></span>)</span>");
- $(this).appendTo(h3.find(".edit-span span"));
- });
-
- $(".widget p.error").on("click", function() {
- $(this).fadeOut(300);
- $(this).parents(".widget").find(".mandatory").focus();
- });
- $(".widget .mandatory").on("click", function() {
- $(this).parents(".widget").find("p.error").fadeOut(300);
- });
- });
-
- jQuery(function ($) {
- /*if ($(window).width() > 769) {
- $('.navbar .dropdown').hover(function() {
- $(this).find('.dropdown-menu').first().stop(true, true).delay(250).slideDown();
-
- }, function() {
- $(this).find('.dropdown-menu').first().stop(true, true).delay(100).slideUp();
-
- });
-
- $('.navbar .dropdown > a').click(function() {
- location.href = this.href;
- });
-
- }*/
- });
|