"use strict"; $(document).ready(function() { /*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> AOS Animation Activation <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/ AOS.init(); window.addEventListener("load", AOS.refresh); AOS.init({ once: true }) /*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Sticky Header <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/ window.onscroll = function() { scrollFunction(); }; function scrollFunction() { if ( document.body.scrollTop > 50 || document.documentElement.scrollTop > 50 ) { $(".site-header--sticky").addClass("scrolling"); } else { $(".site-header--sticky").removeClass("scrolling"); } if ( document.body.scrollTop > 700 || document.documentElement.scrollTop > 700 ) { $(".site-header--sticky.scrolling").addClass("reveal-header"); } else { $(".site-header--sticky.scrolling").removeClass("reveal-header"); } } /*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Prcing Dynamic Script <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/ $('#table-price-value .toggle-btn').on("click", function(e) { console.log($(e.target).parent().parent().hasClass("monthly-active")); $(e.target).toggleClass("clicked"); if ($(e.target).parent().parent().hasClass("monthly-active")) { $(e.target).parent().parent().removeClass("monthly-active").addClass("yearly-active"); } else { $(e.target).parent().parent().removeClass("yearly-active").addClass("monthly-active"); } }); $("[data-pricing-trigger]").on("click", function(e) { $(e.target).addClass("active").siblings().removeClass("active"); var target = $(e.target).attr("data-target"); console.log($(target).attr("data-value-active") == "monthly"); if ($(target).attr("data-value-active") == "monthly") { $(target).attr("data-value-active", "yearly"); } else { $(target).attr("data-value-active", "monthly"); } }); /*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Smooth Scroll <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/ $(".goto").on("click", function(event) { if (this.hash !== "") { event.preventDefault(); var hash = this.hash; $("html, body").animate({ scrollTop: $(hash).offset().top, }, 2000, function() { window.location.hash = hash; } ); } // End if }); /*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Preloader Activation <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/ $(window).load(function() { setTimeout(function() { $("#loading").fadeOut(500); }, 1000); setTimeout(function() { $("#loading").remove(); }, 2000); }); });