(function ($) { "use strict"; /*----------------------------- Menu Stick ---------------------------------*/ $(window).on('scroll',function() { if ($(this).scrollTop() > 50){ $('.sticker').addClass("stick"); } else{ $('.sticker').removeClass("stick"); } }); /*---------------------------- Toogle Search ------------------------------ */ // Handle click on toggle search button $('.header-search').on('click', function() { $('.search').toggleClass('open'); return false; }); /*---------------------------- jQuery MeanMenu ------------------------------ */ jQuery('nav#dropdown').meanmenu(); /*---------------------------- Wow js active ------------------------------ */ new WOW().init(); /*-------------------------- ScrollUp ---------------------------- */ $.scrollUp({ scrollText: '', easingType: 'linear', scrollSpeed: 500, animation: 'fade' }); /*-------------------------- Counter Up ---------------------------- */ $('.counter').counterUp({ delay: 70, time: 5000 }); /*-------------------------------- Testimonial Slick Carousel -----------------------------------*/ $('.testimonial-text-slider').slick({ slidesToShow: 1, slidesToScroll: 1, arrows: false, draggable: false, fade: true, asNavFor: '.slider-nav' }); /*------------------------------------ Testimonial Slick Carousel as Nav --------------------------------------*/ $('.testimonial-image-slider').slick({ slidesToShow: 3, slidesToScroll: 1, asNavFor: '.testimonial-text-slider', dots: false, arrows: true, centerMode: true, focusOnSelect: true, centerPadding: '10px', responsive: [ { breakpoint: 450, settings: { dots: false, slidesToShow: 3, centerPadding: '0px', } }, { breakpoint: 420, settings: { autoplay: true, dots: false, slidesToShow: 1, centerMode: false, } } ] }); /*------------------------------------ Textilate Activation --------------------------------------*/ $('.tlt').textillate({ loop: true, minDisplayTime: 2500 }); /*------------------------------------ ColorSwitcher --------------------------------------*/ $('.ec-handle').on('click', function(){ $('.ec-colorswitcher').trigger('click') $(this).toggleClass('btnclose'); $('.ec-colorswitcher') .toggleClass('sidebarmain'); return false; }); $('.ec-boxed,.pattren-wrap a,.background-wrap a').on('click', function(){ $('.as-mainwrapper').addClass('wrapper-boxed'); $('.as-mainwrapper').removeClass('wrapper-wide'); }); $('.ec-wide').on('click', function(){ $('.as-mainwrapper').addClass('wrapper-wide'); $('.as-mainwrapper').removeClass('wrapper-boxed'); }); })(jQuery);