//for preloader window.addEventListener("load", () => { console.log("Page loaded"); const preloader = document.querySelector(".preloader"); preloader.classList.add("hidden"); }); //for tabview function openPage(pageName, elmnt, color, defaultTab) { var i, tabcontent, tablinks; tabcontent = document.getElementsByClassName("tabcontent"); for (i = 0; i < tabcontent.length; i++) { tabcontent[i].style.display = "none"; } tablinks = document.getElementsByClassName("tablink"); for (i = 0; i < tablinks.length; i++) { tablinks[i].classList.remove("active"); } document.getElementById(pageName).style.display = "block"; elmnt.classList.add("active"); // If a default tab is specified, show its content if (defaultTab) { document.getElementById(defaultTab).click(); } } // Specify the default tab content ('Home' in this case) document.addEventListener("DOMContentLoaded", function () { openPage('Home', document.getElementById('defaultOpen'), 'white', 'Home'); }); //for payment tab document.addEventListener("DOMContentLoaded", function () { var methodRadios = document.querySelectorAll('input[name="payment-method"]'); var firstDetail = document.getElementById("details-1"); // Show the first payment details div initially firstDetail.style.display = "block"; methodRadios.forEach(function (radio) { radio.addEventListener("change", function () { var methodId = this.id; var detailId = "details-" + methodId.split("-")[1]; var details = document.querySelectorAll(".payment-details"); details.forEach(function (detail) { detail.style.display = "none"; }); document.getElementById(detailId).style.display = "block"; }); }); }); //for click to contact button it will go to footer function scrollToFooter() { // Scroll to the footer section smoothly document.getElementById('footer').scrollIntoView({ behavior: 'smooth' }); } //for click to pay button it will go to payment function scrollTopayment() { // Scroll to the footer section smoothly document.getElementById('payment').scrollIntoView({ behavior: 'smooth' }); } //for click to Learn it will go to Video section function scrollToVideo() { document.getElementById('videoSec').scrollIntoView({ behavior: 'smooth' }); } //for click the free webinar button it will go to free webinar section function freeRegister() { document.getElementById('Home').scrollIntoView({ behavior: 'smooth' }); }