/* =================================================================== Author : ModinaTheme Version : 1.0 * ================================================================= */ (function($) { "use strict"; $(document).ready( function() { //>> Mobile Menu Js Start <'], }); //>> Sidebar Toggle Js Start <> Body Overlay Js Start <> Sticky Header Js Start < 250) { $("#header-sticky").addClass("sticky"); } else { $("#header-sticky").removeClass("sticky"); } }); //>> Text Animation Gsap Js Start < 0) { let splitTitleLines = gsap.utils.toArray(".title-anim"); splitTitleLines.forEach(splitTextLine => { const tl = gsap.timeline({ scrollTrigger: { trigger: splitTextLine, start: 'top 90%', end: 'bottom 60%', scrub: false, markers: false, toggleActions: 'play none none none' } }); const itemSplitted = new SplitText(splitTextLine, { type: "words, lines" }); gsap.set(splitTextLine, { perspective: 300}); itemSplitted.split({ type: "lines" }) tl.from(itemSplitted.lines, { duration: 1, delay: 0.3, opacity: 0, rotationX: -50, force3D: true, transformOrigin: "top center -50", stagger: 0.2 }); }); } //>> Hero-1 Slider Start <> Banner Animation <> Hero-4 Slider Start <> Video Popup Start <> Counterup Start <> Wow Animation Start <> Nice Select Start < 0) { $('.testimonial-carousel-active-4').slick({ autoplay: true, autoplaySpeed: 1500, speed: 800, slidesToShow: 1, slidesToScroll: 1, arrows: true, dots: false, prevArrow: $('.testimonial-nav-prev'), nextArrow: $('.testimonial-nav-next'), }); } //>> Search Popup Start <> Scroll Js Start < offset) { jQuery(".scroll-up").addClass("active-scroll"); } else { jQuery(".scroll-up").removeClass("active-scroll"); } }); $(".scroll-up").on("click", function(event) { event.preventDefault(); jQuery("html, body").animate({ scrollTop: 0, }, duration ); return false; }); //>> Mouse Cursor Start < 0) { $(".circle-bar").loading(); } }); // End Document Ready Function $.fn.loading = function() { const DEFAULTS = { backgroundColor: '#b3cef6', progressColor: '#4b86db', percent: 75, duration: 2000 }; $(this).each(function() { const $target = $(this); const opts = { backgroundColor: $target.data('color') ? $target.data('color').split(',')[0] : DEFAULTS.backgroundColor, progressColor: $target.data('color') ? $target.data('color').split(',')[1] : DEFAULTS.progressColor, percent: $target.data('percent') ? $target.data('percent') : DEFAULTS.percent, duration: $target.data('duration') ? $target.data('duration') : DEFAULTS.duration }; // console.log(opts); $target.append('
' + opts.percent + '%
'); $target.find('.background').css('background-color', opts.backgroundColor); $target.find('.left').css('background-color', opts.backgroundColor); $target.find('.rotate').css('background-color', opts.progressColor); $target.find('.right').css('background-color', opts.progressColor); const $rotate = $target.find('.rotate'); setTimeout(function() { $rotate.css({ 'transition': 'transform ' + opts.duration + 'ms linear', 'transform': 'rotate(' + opts.percent * 3.6 + 'deg)' }); }, 1); if (opts.percent > 50) { let animationRight = 'toggle ' + (opts.duration / opts.percent * 50) + 'ms step-end'; let animationLeft = 'toggle ' + (opts.duration / opts.percent * 50) + 'ms step-start'; $target.find('.right').css({ animation: animationRight, opacity: 1 }); $target.find('.left').css({ animation: animationLeft, opacity: 0 }); } }); } function loader() { $(window).on('load', function() { // Animate loader off screen $(".preloader").addClass('loaded'); $(".preloader").delay(600).fadeOut(); }); } loader(); })(jQuery); // End jQuery