File manager - Edit - /home/asiatechinc/public_html/asiatechinc-websites/appleorchardule.com/assets/js/main.js
Back
(function ($) { "use strict"; /*============================================= = Preloader = =============================================*/ function preloader() { $('#preloader').delay(0).fadeOut(); }; $(window).on('load', function () { preloader(); mainSlider(); wowAnimation(); }); /*============================================= = Mobile Menu = =============================================*/ //SubMenu Dropdown Toggle if ($('.menu-area li.menu-item-has-children ul').length) { $('.menu-area .navigation li.menu-item-has-children').append('<div class="dropdown-btn"><span class="fas fa-angle-down"></span></div>'); } //Mobile Nav Hide Show if ($('.mobile-menu').length) { var mobileMenuContent = $('.menu-area .main-menu').html(); $('.mobile-menu .menu-box .menu-outer').append(mobileMenuContent); //Dropdown Button $('.mobile-menu li.menu-item-has-children .dropdown-btn').on('click', function () { $(this).toggleClass('open'); $(this).prev('ul').slideToggle(500); }); //Menu Toggle Btn $('.mobile-nav-toggler').on('click', function () { $('body').addClass('mobile-menu-visible'); }); //Menu Toggle Btn $('.menu-backdrop, .mobile-menu .close-btn').on('click', function () { $('body').removeClass('mobile-menu-visible'); }); } /*============================================= = Menu sticky & Scroll to top = =============================================*/ $(window).on('scroll', function () { var scroll = $(window).scrollTop(); if (scroll < 245) { $("#sticky-header").removeClass("sticky-menu"); $('.scroll-to-target').removeClass('open'); } else { $("#sticky-header").addClass("sticky-menu"); $('.scroll-to-target').addClass('open'); } }); /*============================================= = Scroll Up = =============================================*/ if ($('.scroll-to-target').length) { $(".scroll-to-target").on('click', function () { var target = $(this).attr('data-target'); // animate $('html, body').animate({ scrollTop: $(target).offset().top }, 1000); }); } /*============================================= = Data Background = =============================================*/ $("[data-background]").each(function () { $(this).css("background-image", "url(" + $(this).attr("data-background") + ")") }) /*============================================= = Header Search = =============================================*/ $(".header-search > a").on('click', function () { $(".search-popup-wrap").slideToggle(); return false; }); $(".search-close").on('click', function () { $(".search-popup-wrap").slideUp(500); }); /*============================================= = Datapicker = =============================================*/ $(".datepicker").datepicker({ orientation: "top" }); /*============================================= = Main Slider = =============================================*/ function mainSlider() { var BasicSlider = $('.slider-active'); BasicSlider.on('init', function (e, slick) { var $firstAnimatingElements = $('.single-slider:first-child').find('[data-animation]'); doAnimations($firstAnimatingElements); }); BasicSlider.on('beforeChange', function (e, slick, currentSlide, nextSlide) { var $animatingElements = $('.single-slider[data-slick-index="' + nextSlide + '"]').find('[data-animation]'); doAnimations($animatingElements); }); BasicSlider.slick({ autoplay: true, autoplaySpeed: 10000, dots: false, fade: true, arrows: true, prevArrow: '<button type="button" class="slick-prev"><i class="fa-solid fa-arrow-left"></i></button>', nextArrow: '<button type="button" class="slick-next"><i class="fa-solid fa-arrow-right"></i></button>', responsive: [ { breakpoint: 767, settings: { dots: false, arrows: false } } ] }); function doAnimations(elements) { var animationEndEvents = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend'; elements.each(function () { var $this = $(this); var $animationDelay = $this.data('delay'); var $animationType = 'animated ' + $this.data('animation'); $this.css({ 'animation-delay': $animationDelay, '-webkit-animation-delay': $animationDelay }); $this.addClass($animationType).one(animationEndEvents, function () { $this.removeClass($animationType); }); }); } } /*============================================= = Room Active = =============================================*/ $('.room-active-two').slick({ dots: false, infinite: true, speed: 1000, autoplay: true, arrows: false, slidesToShow: 1, slidesToScroll: 1, responsive: [ { breakpoint: 1200, settings: { slidesToShow: 1, slidesToScroll: 1, infinite: true, } }, { breakpoint: 992, settings: { slidesToShow: 1, slidesToScroll: 1 } }, { breakpoint: 767, settings: { slidesToShow: 1, slidesToScroll: 1, arrows: false, } }, { breakpoint: 575, settings: { slidesToShow: 1, slidesToScroll: 1, arrows: false, } }, ] }); /*============================================= = Service Active = =============================================*/ $('.service-active').slick({ centerMode: true, centerPadding: '0', dots: false, infinite: true, speed: 1000, autoplay: true, arrows: true, slidesToShow: 3, slidesToScroll: 1, prevArrow: '<span class="slick-prev"><i class="flaticon-right-arrow-3"></i></span>', nextArrow: '<span class="slick-next"><i class="flaticon-right-arrow-3"></i></span>', appendArrows: ".service-nav", responsive: [ { breakpoint: 1200, settings: { slidesToShow: 3, slidesToScroll: 1, infinite: true, } }, { breakpoint: 992, settings: { slidesToShow: 3, slidesToScroll: 1 } }, { breakpoint: 767, settings: { slidesToShow: 2, slidesToScroll: 1, arrows: true, } }, { breakpoint: 575, settings: { slidesToShow: 1, slidesToScroll: 1, arrows: true, } }, ] }); /*============================================= = gallery-active = =============================================*/ $('.gallery-active').slick({ centerMode: true, autoplay: true, infinite: true, speed: 500, centerPadding: '0', arrows: false, slidesToShow: 1, responsive: [ { breakpoint: 1800, settings: { slidesToShow: 1, slidesToScroll: 1, infinite: true, } }, { breakpoint: 1500, settings: { slidesToShow: 1, slidesToScroll: 1, centerPadding: '30px', infinite: true, } }, { breakpoint: 1200, settings: { slidesToShow: 1, slidesToScroll: 1, centerPadding: '50px', infinite: true, } }, { breakpoint: 992, settings: { slidesToShow: 1, centerPadding: '0', slidesToScroll: 1 } }, { breakpoint: 767, settings: { slidesToShow: 1, slidesToScroll: 1, centerPadding: '0px', arrows: false, } }, { breakpoint: 575, settings: { slidesToShow: 1, slidesToScroll: 1, centerPadding: '0px', arrows: false, } }, ] }); /*============================================= = gallery-active = =============================================*/ $('.gallery-active-two').slick({ centerMode: true, autoplay: true, infinite: true, speed: 500, centerPadding: '0', arrows: false, slidesToShow: 1, responsive: [ { breakpoint: 1800, settings: { slidesToShow: 1, slidesToScroll: 1, infinite: true, } }, { breakpoint: 1500, settings: { slidesToShow: 1, slidesToScroll: 1, centerPadding: '30px', infinite: true, } }, { breakpoint: 1200, settings: { slidesToShow: 1, slidesToScroll: 1, centerPadding: '50px', infinite: true, } }, { breakpoint: 992, settings: { slidesToShow: 1, centerPadding: '0', slidesToScroll: 1 } }, { breakpoint: 767, settings: { slidesToShow: 1, slidesToScroll: 1, centerPadding: '0px', arrows: false, } }, { breakpoint: 575, settings: { slidesToShow: 1, slidesToScroll: 1, centerPadding: '0px', arrows: false, } }, ] }); /*============================================= = Gallery Active = =============================================*/ $('.gallery-active-three').slick({ dots: false, infinite: true, speed: 1000, autoplay: true, arrows: false, slidesToShow: 5, slidesToScroll: 1, responsive: [ { breakpoint: 1200, settings: { slidesToShow: 4, slidesToScroll: 1, infinite: true, } }, { breakpoint: 992, settings: { slidesToShow: 3, slidesToScroll: 1 } }, { breakpoint: 767, settings: { slidesToShow: 2, slidesToScroll: 1, arrows: false, } }, { breakpoint: 575, settings: { slidesToShow: 1, slidesToScroll: 1, arrows: false, } }, ] }); /*============================================= = Courses Active = =============================================*/ if (jQuery(".room-active").length > 0) { let courses = new Swiper(".room-active", { slidesPerView: 2, spaceBetween: 90, loop: false, autoplay: false, breakpoints: { 320: { slidesPerView: 1, spaceBetween: 15, }, 500: { slidesPerView: 1, spaceBetween: 30, }, 768: { slidesPerView: 1, spaceBetween: 30, }, 992: { slidesPerView: 2, spaceBetween: 30, }, 1200: { slidesPerView: 2, spaceBetween: 40, }, 1500: { slidesPerView: 2, spaceBetween: 90, }, }, // If we need pagination pagination: { el: ".courses-swiper-pagination", clickable: true, }, // Navigation arrows navigation: { nextEl: ".swiper-button-next", prevEl: ".swiper-button-prev", }, // And if we need scrollbar scrollbar: { el: ".swiper-scrollbar", }, }); } /*============================================= = Odometer Active = =============================================*/ $('.odometer').appear(function (e) { var odo = $(".odometer"); odo.each(function () { var countNumber = $(this).attr("data-count"); $(this).html(countNumber); }); }); /*============================================= = Magnific Popup = =============================================*/ $('.popup-image').magnificPopup({ type: 'image', gallery: { enabled: true } }); /* magnificPopup video view */ $('.popup-video').magnificPopup({ type: 'iframe' }); /*============================================= = Wow Active = =============================================*/ function wowAnimation() { var wow = new WOW({ boxClass: 'wow', animateClass: 'animated', offset: 0, mobile: false, live: true }); wow.init(); } })(jQuery);
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.28 |
proxy
|
phpinfo
|
Settings