$(document).ready(function() { $('.header-img').addClass('rotate-imgssss'); }); $(document).ready(function(){ $('form.footerform').on('submit', function(event) { event.preventDefault(); var form = $(this); $.ajax({ type: form.attr('method'), url: form.attr('action'), data: form.serialize(), success: function(response) { $('#thankYouPopup').fadeIn(); // Show the popup }, error: function() { alert('There was an error processing your request.'); } }); }); // Close the popup when the close button is clicked $('#closePopup').on('click', function() { $('#thankYouPopup').fadeOut(); }); // Optional: Close the popup when clicking outside the content area $(window).on('click', function(e) { if ($(e.target).is('#thankYouPopup')) { $('#thankYouPopup').fadeOut(); } }); }); $(document).ready(function(){ jQuery('ul.tabs').each(function(){ // For each set of tabs, we want to keep track of // which tab is active and it's associated content var $active, $content, $links = jQuery(this).find('a'); // If the location.hash matches one of the links, use that as the active tab. // If no match is found, use the first link as the initial active tab. $active = jQuery($links.filter('[href="'+location.hash+'"]')[0] || $links[0]); $active.addClass('active'); $content = $($active[0].hash); // Hide the remaining content $links.not($active).each(function () { jQuery(this.hash).hide(); }); // Bind the click event handler jQuery(this).on('click', 'a', function(e){ // Make the old tab inactive. $active.removeClass('active'); $content.hide(); // Update the variables with the new link and content $active = jQuery(this); $content = jQuery(this.hash); // Make the tab active. $active.addClass('active'); $content.show(); // Prevent the anchor's default click action e.preventDefault(); }); }); }); $(document).ready(function() { $(".logos-slider").slick({ slidesToShow: 4, slidesToScroll: 1, autoplay: true, pauseOnHover:false, autoplaySpeed: 3000, arrows: false, dots:false, responsive: [ { breakpoint: 1199, settings: { slidesToShow: 3, } }, { breakpoint: 767, settings: { slidesToShow: 1, } } ] }); }); $(document).ready(function() { var $slider = $('.customer-slider'); $slider.on('init', function(event, slick){ var totalSlides = slick.slideCount; $('#total-slides').text(totalSlides < 10 ? '' + totalSlides : totalSlides); }); $slider.slick({ slidesToShow: 1, slidesToScroll: 1, autoplay: true, pauseOnHover:false, autoplaySpeed: 3000000, arrows: true, nextArrow: jQuery(".t-next"), prevArrow: jQuery(".t-prev"), dots:false, appendDots: $('.slick-dots-container'), }); $slider.on('afterChange', function(event, slick, currentSlide){ var currentSlideNumber = currentSlide + 1; // since currentSlide is 0-based $('#current-slide').text(currentSlideNumber < 10 ? '' + currentSlideNumber : currentSlideNumber); }); }); $(document).ready(function() { // Cache DOM elements var stickyBorder = $('.sticky-border2'); var stickyColumn = $('.section-9'); var totalCol = $('.section-9'); // Get the initial offset and height var stickyOffset = stickyColumn.offset().top; var totalColOffsetTop = totalCol.offset().top; var totalColHeight = totalCol.outerHeight(); var stickyBorderInitialHeight = stickyBorder.height(); // This will be 0 initially $(window).on('scroll', function() { var scrollTop = $(window).scrollTop(); // Add 'sticky-border' class when scrolling past the stickyOffset if (scrollTop >= stickyOffset) { stickyBorder.addClass('sticky-border'); } else { stickyBorder.removeClass('sticky-border'); } // Calculate the new height only when scrolling within the totalCol section if (scrollTop >= stickyOffset && scrollTop < totalColOffsetTop + totalColHeight) { var scrollRelativeToSticky = scrollTop - stickyOffset; var newHeight = Math.min(stickyBorderInitialHeight + scrollRelativeToSticky, totalColHeight); stickyBorder.height(newHeight); } else if (scrollTop < stickyOffset) { // Reset height and remove class when above sticky section stickyBorder.height(0); // Reset to initial height stickyBorder.removeClass('sticky-border'); } else { // Cap height when scrolling beyond the totalCol section stickyBorder.height(totalColHeight); } }); }); $(document).ready(function() { var $coloumnSticky = $('.section-9'); var $bgParallax = $('.bg-parallax'); var $section9 = $('#colwrap'); var stickyEnd = $section9.offset().top + $section9.outerHeight(); var lastScrollTop = 0; $(window).on('scroll', function() { var scrollTop = $(this).scrollTop(); var windowHeight = $(window).height(); if (scrollTop > stickyEnd) { // Adjust height of .bg-parallax var scrollDistance = scrollTop - stickyEnd; var heightIncrease = Math.floor(scrollDistance / 100) * 40; // Increase height by 100px per scroll distance $bgParallax.css('height', heightIncrease + 'px'); } else { $bgParallax.css('height', 0); } lastScrollTop = scrollTop; }); }); $(document).ready(function() { // setTimeout(function() { // const myModal = new bootstrap.Modal(document.getElementById('onLoadModal')); // myModal.show(); // }, 8000); // Show modal after 3 seconds of page load // Get all buttons with class 'main-btn' // const buttons = document.querySelectorAll('.main-btn'); // // Loop through each button and attach a click event listener // buttons.forEach(function(button) { // button.addEventListener('click', function() { // const myModal = new bootstrap.Modal(document.getElementById('onLoadModal')); // myModal.show(); // }); // }); // Function to show the modal function showModal() { const myModal = new bootstrap.Modal(document.getElementById('onLoadModal')); myModal.show(); // Attach event listener to close button inside the modal document.querySelector('.btn-close').addEventListener('click', function() { myModal.hide(); }); } // Show the modal after 8 seconds setTimeout(showModal, 8000); const buttons = document.querySelectorAll('.main-btn'); // Loop through each button and attach a click event listener buttons.forEach(function(button) { button.addEventListener('click', function() { const myModal = new bootstrap.Modal(document.getElementById('onLoadModal')); myModal.show(); // Attach event listener to close button inside the modal const closeButton = document.querySelector('.btn-close'); closeButton.addEventListener('click', function() { myModal.hide(); }); }); }); // Handle form submission for the loadform $('.loadform').on('submit', function(e) { e.preventDefault(); $.ajax({ url:$('.loadform').attr('action'), type:'POST', data:$('.loadform').serializeArray(), success:function(res) { console.log('Load Form'); $('.loadform').append('
Thank you for contacting us!
'); setTimeout(function() { location.reload(); }, 2000); } }) }); });