Merge pull request #301 from smellman/dev/anime.js

remove jquery.easing and remove deprecated function
This commit is contained in:
David Miller 2021-03-29 15:55:15 -04:00 committed by GitHub
commit 28f356391c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 23 deletions

2
dist/index.html vendored
View File

@ -544,7 +544,7 @@
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/js/bootstrap.bundle.min.js"></script>
<!-- Third party plugin JS-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.4.1/jquery.easing.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/animejs/3.2.1/anime.min.js"></script>
<!-- Contact form JS-->
<script src="assets/mail/jqBootstrapValidation.js"></script>
<script src="assets/mail/contact_me.js"></script>

17
dist/js/scripts.js vendored
View File

@ -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(
{
anime({
targets: 'html, body',
scrollTop: target.offset().top - 72,
},
1000,
"easeInOutExpo"
);
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

View File

@ -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(
{
anime({
targets: 'html, body',
scrollTop: target.offset().top - 72,
},
1000,
"easeInOutExpo"
);
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

View File

@ -452,7 +452,7 @@ 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')