Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 

135 rader
4.1 KiB

  1. /*$('.quickContactbtn').click(function () {
  2. $(".quickContact").addClass('active');
  3. });
  4. $('.quickContactclose').click(function () {
  5. $(".quickContact").removeClass('active');
  6. });*/
  7. $(document).ready((e) => {
  8. $(".ce_sliderStart .slider-wrapper").slick({
  9. autoplay: true,
  10. autoplaySpeed: 5000,
  11. slidesToShow: 1,
  12. slidesToScroll: 1,
  13. infinite: true,
  14. arrows: false,
  15. dots: true,
  16. // responsive: [{
  17. // breakpoint: 1640,
  18. // settings: {
  19. // autoplaySpeed: 2000,
  20. // slidesToShow: 4,
  21. // slidesToScroll: 1,
  22. // arrows: true,
  23. // }
  24. // }, {
  25. // breakpoint: 992,
  26. // settings: {
  27. // slidesToShow: 3,
  28. // slidesToScroll: 1,
  29. // arrows: true,
  30. // }
  31. // }, {
  32. // breakpoint: 576,
  33. // settings: {
  34. // slidesToShow: 2,
  35. // slidesToScroll: 1,
  36. // arrows: true,
  37. // },
  38. // }]
  39. });
  40. $(".product-slider .product_list, .mod_iso_relatedproducts .product_list").slick({
  41. autoplay: false,
  42. slidesToShow: 3,
  43. slidesToScroll: 1,
  44. infinite: true,
  45. arrows: true,
  46. dots: false,
  47. });
  48. $(".spwn-image-gallery").slick({
  49. autoplay: false,
  50. slidesToShow: 1,
  51. slidesToScroll: 1,
  52. infinite: true,
  53. arrows: false,
  54. dots: true
  55. });
  56. // Hide caption of youtube
  57. $(".ce_youtube .responsive a").on("click", (e) => {
  58. $("iframe").parents(".video_container").find(".caption").hide();
  59. });
  60. // Add number to header basket
  61. $("#header-basket-items").appendTo("header a.isotope-basket, header strong.isotope-basket");
  62. // FAQ list toggle
  63. $(".mod_faqlist ul li h3").on("click", (e) => {
  64. if ($(this).parents("li").hasClass("open")) {
  65. $(this).parents("li").find(".answer").slideUp(300);
  66. $(this).parents("li").removeClass("open");
  67. } else {
  68. $(this).parents("li").find(".answer").slideDown(300);
  69. $(this).parents("li").addClass("open");
  70. }
  71. });
  72. // Blog-Detail: Change Position of first video to top and hide img
  73. let spwnJsImg = $(".spwn-js-img");
  74. if (spwnJsImg.length && $(".ce_youtube").length) {
  75. $(".ce_youtube:first").insertAfter(spwnJsImg);
  76. spwnJsImg.hide();
  77. }
  78. // Product detail: Add amount
  79. $(".spwn-add-amount").on("click", function() {
  80. let amountInput = $(this).parents(".quantity_container").find("input");
  81. let newAmount = parseInt(amountInput.val()) + 1;
  82. if (amountInput.val() === "") {
  83. newAmount = 2;
  84. }
  85. amountInput.val(newAmount);
  86. });
  87. // Product detail: Remove amount
  88. $(".spwn-remove-amount").on("click", function() {
  89. let amountInput = $(this).parents(".quantity_container").find("input");
  90. let newAmount = parseInt(amountInput.val()) - 1;
  91. if (amountInput.val() <= 1) {
  92. newAmount = "1";
  93. }
  94. amountInput.val(newAmount);
  95. });
  96. // Move cart voucher box
  97. $(".mod_iso_coupons h2").prependTo($(".spwn-coupons"));
  98. $(".mod_iso_coupons").appendTo($(".voucher-box"));
  99. // Hack checkout
  100. $("<div id='spwn-info-boxes'></div>").insertBefore(".review .clear");
  101. $(".review .info_container").appendTo($("#spwn-info-boxes"));
  102. $(".review .info_container .edit").each(function() {
  103. let h3 = $(this).parents(".info_container").find("h3");
  104. h3.append("<span class='edit-span'>(<span></span>)</span>");
  105. $(this).appendTo(h3.find(".edit-span span"));
  106. });
  107. });
  108. jQuery(function ($) {
  109. /*if ($(window).width() > 769) {
  110. $('.navbar .dropdown').hover(function() {
  111. $(this).find('.dropdown-menu').first().stop(true, true).delay(250).slideDown();
  112. }, function() {
  113. $(this).find('.dropdown-menu').first().stop(true, true).delay(100).slideUp();
  114. });
  115. $('.navbar .dropdown > a').click(function() {
  116. location.href = this.href;
  117. });
  118. }*/
  119. });