No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 

158 líneas
4.7 KiB

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