Server IP : 108.170.25.35 / Your IP : 3.139.108.48 Web Server : Apache/2 System : Linux gains.winzonesoftech.com 4.18.0-513.24.1.el8_9.x86_64 #1 SMP Mon Apr 8 11:23:13 EDT 2024 x86_64 User : valamburi ( 1607) PHP Version : 8.1.28 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/valamburi/domains/valamburiinteriors.com/private_html/js/ |
Upload File : |
/* JS Document */ /****************************** [Table of Contents] 1. Vars and Inits 2. Set Header 3. Init Menu 4. Init Home Slider 5. Init Date Picker 6. Init SVG 7. Init Gallery 8. Init Testimonials Slider 9. Init Booking Slider 10. Init Blog Slider ******************************/ $(document).ready(function() { "use strict"; /* 1. Vars and Inits */ var header = $('.header'); setHeader(); $(window).on('resize', function() { setHeader(); setTimeout(function() { $(window).trigger('resize.px.parallax'); }, 375); }); $(document).on('scroll', function() { setHeader(); }); initMenu(); initHomeSlider(); initDatePicker(); initSvg(); initGallery(); initTestSlider(); initBookingSlider(); initBlogSlider(); /* 2. Set Header */ function setHeader() { if($(window).scrollTop() > 91) { header.addClass('scrolled'); } else { header.removeClass('scrolled'); } } /* 3. Init Menu */ function initMenu() { if($('.menu').length) { var menu = $('.menu'); var hamburger = $('.hamburger'); var close = $('.menu_close'); hamburger.on('click', function() { menu.toggleClass('active'); }); close.on('click', function() { menu.toggleClass('active'); }); } } /* 4. Init Home Slider */ function initHomeSlider() { if($('.home_slider').length) { var homeSlider = $('.home_slider'); homeSlider.owlCarousel( { items:1, autoplay:true, loop:true, nav:false, smartSpeed:1200 }); /* Custom dots events */ if($('.home_slider_custom_dot').length) { $('.home_slider_custom_dot').on('click', function() { $('.home_slider_custom_dot').removeClass('active'); $(this).addClass('active'); homeSlider.trigger('to.owl.carousel', [$(this).index(), 1200]); }); } /* Change active class for dots when slide changes by nav or touch */ homeSlider.on('changed.owl.carousel', function(event) { $('.home_slider_custom_dot').removeClass('active'); $('.home_slider_custom_dots li').eq(event.page.index).addClass('active'); }); } } /* 5. Init Date Picker */ function initDatePicker() { if($('.datepicker').length) { var datePickers = $('.datepicker'); datePickers.each(function() { var dp = $(this); // Uncomment to use date as a placeholder // var date = new Date(); // var dateM = date.getMonth() + 1; // var dateD = date.getDate(); // var dateY = date.getFullYear(); // var dateFinal = dateM + '/' + dateD + '/' + dateY; var placeholder = dp.data('placeholder'); dp.val(placeholder); dp.datepicker(); }); } } /* 6. Init SVG */ function initSvg() { if($('img.svg').length) { jQuery('img.svg').each(function() { var $img = jQuery(this); var imgID = $img.attr('id'); var imgClass = $img.attr('class'); var imgURL = $img.attr('src'); jQuery.get(imgURL, function(data) { // Get the SVG tag, ignore the rest var $svg = jQuery(data).find('svg'); // Add replaced image's ID to the new SVG if(typeof imgID !== 'undefined') { $svg = $svg.attr('id', imgID); } // Add replaced image's classes to the new SVG if(typeof imgClass !== 'undefined') { $svg = $svg.attr('class', imgClass+' replaced-svg'); } // Remove any invalid XML tags as per http://validator.w3.org $svg = $svg.removeAttr('xmlns:a'); // Replace image with new SVG $img.replaceWith($svg); }, 'xml'); }); } } /* 7. Init Gallery */ function initGallery() { if($('.gallery_slider').length) { var gallerySlider = $('.gallery_slider'); gallerySlider.owlCarousel( { items:4, loop:false, autoplay:false, dots:false, nav:false, smartSpeed:1200, responsive: { 0:{items:1}, 576:{items:2}, 768:{items:3}, 992:{items:4} } }); if($('.colorbox').length) { $('.colorbox').colorbox( { rel:'colorbox', photo: true, maxWidth:'95%', maxHeight:'95%' }); } } } /* 8. Init Testimonials Slider */ function initTestSlider() { if($('.test_slider').length) { var testSlider = $('.test_slider'); testSlider.owlCarousel( { items:3, autoplay:true, loop:true, smartSpeed:1200, dots:false, nav:false, margin:30, autoplayHoverPause:true, responsive: { 0:{items:1}, 768:{items:2}, 992:{items:3} } }); } } /* 9. Init Booking Slider */ function initBookingSlider() { if($('.booking_slider').length) { var bookingSlider = $('.booking_slider'); bookingSlider.owlCarousel( { items:3, autoplay:true, autoplayHoverPause:true, loop:true, smartSpeed:1200, dots:false, nav:false, margin:30, responsive: { 0:{items:1}, 768:{items:2}, 992:{items:3} } }); } } /* 10. Init Blog Slider */ function initBlogSlider() { if($('.blog_slider').length) { var blogSlider = $('.blog_slider'); blogSlider.owlCarousel( { items:3, autoplay:true, loop:true, smartSpeed:1200, dots:false, nav:false, margin:2, responsive: { 0:{items:1}, 768:{items:2}, 992:{items:3} } }); } } });