File manager - Edit - /home/asiatechinc/public_html/asiatech-websites/maydahospitality.com/assets/js/scripts.js
Back
(function($) { "use strict"; /*---------------------------- wow js active ------------------------------ */ new WOW().init(); /*------------- preloader js --------------*/ $(window).on('load', function() { // makes sure the whole site is loaded $('.preloder-wrap').fadeOut(); // will first fade out the loading animation $('.loader').delay(150).fadeOut('slow'); // will fade out the white DIV that covers the website. $('body').delay(150).css({ 'overflow': 'visible' }) }) // slider-active $('.slider-active').owlCarousel({ margin: 0, loop: true, autoplay: true, autoplayTimeout: 4000, nav: true, smartSpeed: 800, navText: ['<i class="fa fa-chevron-left"></i>', '<i class="fa fa-chevron-right"></i>'], URLhashListener: true, startPosition: 'URLHash', responsive: { 0: { items: 1 }, 450: { items: 1 }, 768: { items: 1 }, 1000: { items: 1 } } }); // slider-active $('.slider-active').owlCarousel({ margin: 0, loop: true, autoplay: true, autoplayTimeout: 4000, nav: true, smartSpeed: 800, navText: ['<i class="fa fa-chevron-left"></i>', '<i class="fa fa-chevron-right"></i>'], URLhashListener: true, startPosition: 'URLHash', responsive: { 0: { items: 1 }, 450: { items: 1 }, 768: { items: 1 }, 1000: { items: 1 } } }); // slider-active2 $('.slider-active2').owlCarousel({ margin: 0, loop: true, animateOut: 'slideOutDown', animateIn: 'slideInDown', autoplay: true, autoplayTimeout: 4000, nav: true, smartSpeed: 800, navText: ['<i class="fa fa-chevron-left"></i>', '<i class="fa fa-chevron-right"></i>'], URLhashListener: true, startPosition: 'URLHash', responsive: { 0: { items: 1 }, 450: { items: 1 }, 768: { items: 1 }, 1000: { items: 1 } } }); // slider-active3 $('.slider-active3').owlCarousel({ margin: 0, loop: false, animateOut: 'fadeOut', animateIn: 'FadepIn', autoplay: true, autoplayTimeout: 4000, nav: true, smartSpeed: 800, navText: ['<i class="fa fa-chevron-left"></i>', '<i class="fa fa-chevron-right"></i>'], URLhashListener: true, startPosition: 'URLHash', responsive: { 0: { items: 1 }, 450: { items: 1 }, 768: { items: 1 }, 1000: { items: 1 } } }); //slider-area background setting function sliderBgSetting() { if ($(".slider-area .slider-items").length) { $(".slider-area .slider-items").each(function() { var $this = $(this); var img = $this.find(".slider").attr("src"); $this.css({ backgroundImage: "url(" + img + ")", backgroundSize: "cover", backgroundPosition: "center center" }) }); } } // test-active $('.test-img-active ').slick({ slidesToShow: 1, slidesToScroll: 1, arrows: false, fade: true, asNavFor: '.test-content-active' }); $('.test-content-active').slick({ slidesToShow: 1, slidesToScroll: 1, asNavFor: '.test-img-active', dots: true, arrows: false, centerMode: false, focusOnSelect: false }); // test-active $('.about-img-active').slick({ slidesToShow: 1, slidesToScroll: 1, arrows: true, nextArrow: '<i class="fa fa-chevron-right"></i>', prevArrow: '<i class="fa fa-chevron-left"></i>', fade: true, asNavFor: '.about-active' }); $('.about-active').slick({ slidesToShow: 1, slidesToScroll: 1, asNavFor: '.about-img-active', dots: false, arrows: false, centerMode: false, focusOnSelect: false }); // brand-active $('.test-active').owlCarousel({ margin: 0, loop: true, autoplay: true, autoplayTimeout: 4000, nav: true, smartSpeed: 800, navText: ['<i class="fa fa-chevron-left"></i>', '<i class="fa fa-chevron-right"></i>'], URLhashListener: true, startPosition: 'URLHash', responsive: { 0: { items: 1 }, 450: { items: 1 }, 768: { items: 1 }, 1000: { items: 1 } } }); // slider-active2 $('.about-page-active').owlCarousel({ margin: 0, loop: true, autoplay: true, autoplayTimeout: 4000, nav: true, smartSpeed: 800, navText: ['<i class="fa fa-chevron-left"></i>', '<i class="fa fa-chevron-right"></i>'], URLhashListener: true, startPosition: 'URLHash', responsive: { 0: { items: 1 }, 450: { items: 1 }, 768: { items: 1 }, 1000: { items: 1 } } }); /*========================================================================== WHEN DOCUMENT LOADING ==========================================================================*/ $(window).on('load', function() { sliderBgSetting() }); // Parallax background function bgParallax() { if ($(".parallax").length) { $(".parallax").each(function() { var height = $(this).position().top; var resize = height - $(window).scrollTop(); var parallaxSpeed = $(this).data("speed"); var doParallax = -(resize / parallaxSpeed); var positionValue = doParallax + "px"; var img = $(this).data("bg-image"); $(this).css({ backgroundImage: "url(" + img + ")", backgroundPosition: "50%" + positionValue, backgroundSize: "cover", }); if (window.innerWidth < 768) { $(this).css({ backgroundPosition: "center center" }); } }); } } bgParallax(); $(window).on("scroll", function() { bgParallax(); }); // // stickey menu $(window).on('scroll', function() { var scroll = $(window).scrollTop(), mainHeader = $('#sticky-header'), mainHeaderHeight = mainHeader.innerHeight(); // console.log(mainHeader.innerHeight()); if (scroll > 0) { $("#sticky-header").addClass("sticky-menu"); } else { $("#sticky-header").removeClass("sticky-menu"); } }); /*-------------------------- scrollUp ---------------------------- */ $.scrollUp({ scrollText: '<i class="fa fa-arrow-up"></i>', easingType: 'linear', scrollSpeed: 900, animation: 'fade' }); /*-- Magnific Popup ------------------------*/ $('.popup').magnificPopup({ type: 'image', gallery: { enabled: true } }); $('.video-popup').magnificPopup({ type: 'iframe', gallery: { enabled: true } }); // counter up $('.counter').counterUp({ delay: 10, time: 1000 }); // slicknav $('ul#navigation').slicknav({ prependTo: ".responsive-menu-wrap" }); $('.grid').imagesLoaded(function() { // filter items on button click $('.project-menu').on('click', 'button', function() { var filterValue = $(this).attr('data-filter'); $grid.isotope({ filter: filterValue }); }); // init Isotope var $grid = $('.grid').isotope({ itemSelector: '.project', percentPosition: true, masonry: { // use outer width of grid-sizer for columnWidth columnWidth: '.project', } }); }); $('.project-menu button').on('click', function(event) { $(this).siblings('.active').removeClass('active'); $(this).addClass('active'); event.preventDefault(); }); /*------------------------------------------------------- blog details -----------------------------------------------------*/ if ($(".about-area,.skill-area").length) { var post = $(".about-img,.skill-img"); post.each(function() { var $this = $(this); var entryMedia = $this.find("img"); var entryMediaPic = entryMedia.attr("src"); $this.css({ backgroundImage: "url(" + entryMediaPic + ")", backgroundSize: "cover", backgroundPosition: "center center", }) }) } function setTwoColEqHeight($col1, $col2) { var firstCol = $col1, secondCol = $col2, firstColHeight = $col1.innerHeight(), secondColHeight = $col2.innerHeight(); if (firstColHeight > secondColHeight) { secondCol.css({ "height": firstColHeight + 1 + "px" }) } else { firstCol.css({ "height": secondColHeight + 1 + "px" }) } } $(window).on("load", function() { setTwoColEqHeight($(".about-img.skill-img"), $(".about-wrap,.skill-wrap")); }); // mouse scrolling effect $.scrollSpeed(200, 800); /*--------------------- // Ajax Contact Form --------------------- */ $('.cf-msg').hide(); $('form#cf button#submit').on('click', function() { var fname = $('#fname').val(); var subject = $('#subject').val(); var email = $('#email').val(); var msg = $('#msg').val(); var regex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/; if (!regex.test(email)) { alert('Please enter valid email'); return false; } fname = $.trim(fname); subject = $.trim(subject); email = $.trim(email); msg = $.trim(msg); if (fname != '' && email != '' && msg != '') { var values = "fname=" + fname + "&subject=" + subject + "&email=" + email + " &msg=" + msg; $.ajax({ type: "POST", url: "mail.php", data: values, success: function() { $('#fname').val(''); $('#subject').val(''); $('#email').val(''); $('#msg').val(''); $('.cf-msg').fadeIn().html('<div class="alert alert-success"><strong>Success!</strong> Email has been sent successfully.</div>'); setTimeout(function() { $('.cf-msg').fadeOut('slow'); }, 4000); } }); } else { $('.cf-msg').fadeIn().html('<div class="alert alert-danger"><strong>Warning!</strong> Please fillup the informations correctly.</div>') } return false; }); })(jQuery);
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings