diff --git a/dist/index.html b/dist/index.html index bb9502d..500d4f2 100644 --- a/dist/index.html +++ b/dist/index.html @@ -544,7 +544,7 @@ - + diff --git a/dist/js/scripts.js b/dist/js/scripts.js index 356840d..3ebe199 100644 --- a/dist/js/scripts.js +++ b/dist/js/scripts.js @@ -7,7 +7,7 @@ "use strict"; // Start of use strict // Smooth scrolling using jQuery easing - $('a.js-scroll-trigger[href*="#"]:not([href="#"])').click(function () { + $('a.js-scroll-trigger[href*="#"]:not([href="#"])').on('click', function () { if ( location.pathname.replace(/^\//, "") == this.pathname.replace(/^\//, "") && @@ -18,20 +18,19 @@ ? target : $("[name=" + this.hash.slice(1) + "]"); if (target.length) { - $("html, body").animate( - { - scrollTop: target.offset().top - 72, - }, - 1000, - "easeInOutExpo" - ); + anime({ + targets: 'html, body', + scrollTop: target.offset().top - 72, + duration: 1000, + easing: 'easeInOutExpo' + }); return false; } } }); // Closes responsive menu when a scroll trigger link is clicked - $(".js-scroll-trigger").click(function () { + $(".js-scroll-trigger").on('click', function () { $(".navbar-collapse").collapse("hide"); }); @@ -52,5 +51,5 @@ // Collapse now if page is not at top navbarCollapse(); // Collapse the navbar when page is scrolled - $(window).scroll(navbarCollapse); + $(window).on('scroll', navbarCollapse); })(jQuery); // End of use strict diff --git a/src/js/scripts.js b/src/js/scripts.js index 35125dd..203264b 100644 --- a/src/js/scripts.js +++ b/src/js/scripts.js @@ -2,7 +2,7 @@ "use strict"; // Start of use strict // Smooth scrolling using jQuery easing - $('a.js-scroll-trigger[href*="#"]:not([href="#"])').click(function () { + $('a.js-scroll-trigger[href*="#"]:not([href="#"])').on('click', function () { if ( location.pathname.replace(/^\//, "") == this.pathname.replace(/^\//, "") && @@ -13,20 +13,19 @@ ? target : $("[name=" + this.hash.slice(1) + "]"); if (target.length) { - $("html, body").animate( - { - scrollTop: target.offset().top - 72, - }, - 1000, - "easeInOutExpo" - ); + anime({ + targets: 'html, body', + scrollTop: target.offset().top - 72, + duration: 1000, + easing: 'easeInOutExpo' + }); return false; } } }); // Closes responsive menu when a scroll trigger link is clicked - $(".js-scroll-trigger").click(function () { + $(".js-scroll-trigger").on('click', function () { $(".navbar-collapse").collapse("hide"); }); @@ -47,5 +46,5 @@ // Collapse now if page is not at top navbarCollapse(); // Collapse the navbar when page is scrolled - $(window).scroll(navbarCollapse); + $(window).on('scroll', navbarCollapse); })(jQuery); // End of use strict diff --git a/src/pug/index.pug b/src/pug/index.pug index c1c5cff..2dea1bf 100644 --- a/src/pug/index.pug +++ b/src/pug/index.pug @@ -452,11 +452,11 @@ html(lang='en') script(src='https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/js/bootstrap.bundle.min.js') // Third party plugin JS - script(src='https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.4.1/jquery.easing.min.js') + script(src='https://cdnjs.cloudflare.com/ajax/libs/animejs/3.2.1/anime.min.js') // Contact form JS script(src='assets/mail/jqBootstrapValidation.js') script(src='assets/mail/contact_me.js') // Core theme JS - script(src='js/scripts.js') \ No newline at end of file + script(src='js/scripts.js')