jQuery(document).ready(function( $ ) { new $.Zebra_Pin($('.tmt-sticky-yes'), {class_name: 'is-sticky'}); $(document).ready(function(){ $('.blocks-gallery-item a').attr("data-fancybox", "gallery"); $('.wp-block-image a').attr("data-fancybox", ""); $('[data-fancybox="gallery"]').fancybox(); $('.elementor-slides').slick(); $('.testimonial-slider').slick(); $('.last-product-slide').slick({prevArrow: '',nextArrow: '' +'',responsive: [{breakpoint: 1200,settings: {slidesToShow:3,slidesToScroll: 1,infinite: true,dots:false}},{breakpoint: 990,settings: {slidesToShow: 2,slidesToScroll: 1,dots:false}},{breakpoint: 768,settings: {slidesToShow: 1,slidesToScroll: 1,dots:false}},{breakpoint: 480,settings: {slidesToShow: 1,slidesToScroll: 1,dots:false}}]}); $('.wpcf7-submit').parent().addClass('tmt-wpcf7-submit'); }); // Accordion $(".tmt-accordion-title").on("click", function() { if ($(this).hasClass("tmt-open")) { $(this).removeClass("tmt-open"); $(this).siblings(".tmt-accordion-content").slideUp(200); } else { if ($(this).hasClass("multiple")) {} else { $(".tmt-accordion-title").removeClass("tmt-open"); $(".tmt-accordion-content").slideUp(200); } $(this).addClass("tmt-open"); $(this).siblings(".tmt-accordion-content").slideDown(200); } }); // STAART Menu Settings $("#bars").click(function(){$("body").toggleClass('open-menu');$(".open-menu .menu").click(function(){$("body").removeClass('open-menu');});}); $(".menu-item-has-children").click(function(e) {e.stopPropagation();$(this).toggleClass('open-sub-menu');}); $(".menu-item-has-children > ul").click(function(e) {e.stopPropagation();$(this).addClass('open-sub-menu');}); $("li.mega-menu").parents("li.menu-item-has-children").addClass("main-mega-menu"); // END Menu Settings // Whatsapp $( ".whatsapp-pupup" ).click(function(e) { e.stopPropagation(); $( ".whatsapp-chat" ).toggleClass( "open-chat"); $(this).children("i").toggleClass( "fab fa-whatsapp fas fa-times"); }); // STAART Back to Top Settings var btn = $('#top'); $(window).scroll(function() { if ($(window).scrollTop() > 500) { btn.fadeIn(); } else { btn.fadeOut(); } }); btn.on('click', function(e) { e.preventDefault(); $('html, body').animate({scrollTop:0}, '300'); }); // END Back to Top Settings //icon header $(".drop-down-btn").on("click", function(e) { e.preventDefault(); if ($(this).hasClass("tmt-open")) { $(this).removeClass("tmt-open"); $(this).next(".drop-down-content").slideUp(150); } else { $(".drop-down-btn").removeClass("tmt-open"); $(".drop-down-content").slideUp(150); $(this).addClass("tmt-open"); $(this).next(".drop-down-content").slideDown(300); } }); }); ( function( $ ) { var WidgetElementorSlidesHandler = function( $scope, $ ) { $scope.find('.elementor-slides').slick(); }; var WidgetElementorTestimonialHandler = function( $scope, $ ) { $scope.find('.testimonial-slider').slick(); }; var WidgetElementorlastproductHandler = function( $scope, $ ) { $scope.find('.last-product-slide').slick({prevArrow: '',nextArrow: '' +'',responsive: [{breakpoint: 1200,settings: {slidesToShow:3,slidesToScroll: 1,infinite: true,dots:false}},{breakpoint: 990,settings: {slidesToShow: 2,slidesToScroll: 1,dots:false}},{breakpoint: 768,settings: {slidesToShow: 1,slidesToScroll: 1,dots:false}},{breakpoint: 480,settings: {slidesToShow: 1,slidesToScroll: 1,dots:false}}]}); }; $( window ).on( 'elementor/frontend/init', function() { elementorFrontend.hooks.addAction( 'frontend/element_ready/themento_slides.default', WidgetElementorSlidesHandler ); elementorFrontend.hooks.addAction( 'frontend/element_ready/themento_testimonial.default', WidgetElementorTestimonialHandler ); elementorFrontend.hooks.addAction( 'frontend/element_ready/themento-post-product.default', WidgetElementorlastproductHandler ); } ); } )( jQuery );