- remove jquery.easing
- use on event instead of click and scroll
This commit is contained in:
parent
ff61282438
commit
28a8758e94
2
dist/css/styles.css
vendored
2
dist/css/styles.css
vendored
@ -1,7 +1,7 @@
|
||||
@charset "UTF-8";
|
||||
/*!
|
||||
* Start Bootstrap - Agency v6.0.3 (https://startbootstrap.com/theme/agency)
|
||||
* Copyright 2013-2020 Start Bootstrap
|
||||
* Copyright 2013-2021 Start Bootstrap
|
||||
* Licensed under MIT (https://github.com/StartBootstrap/startbootstrap-agency/blob/master/LICENSE)
|
||||
*/
|
||||
/*!
|
||||
|
2
dist/index.html
vendored
2
dist/index.html
vendored
@ -538,7 +538,7 @@
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/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>
|
||||
|
21
dist/js/scripts.js
vendored
21
dist/js/scripts.js
vendored
@ -1,13 +1,13 @@
|
||||
/*!
|
||||
* Start Bootstrap - Agency v6.0.3 (https://startbootstrap.com/theme/agency)
|
||||
* Copyright 2013-2020 Start Bootstrap
|
||||
* Copyright 2013-2021 Start Bootstrap
|
||||
* Licensed under MIT (https://github.com/StartBootstrap/startbootstrap-agency/blob/master/LICENSE)
|
||||
*/
|
||||
(function ($) {
|
||||
"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
|
||||
|
@ -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
|
||||
|
@ -449,11 +449,11 @@ html(lang='en')
|
||||
script(src='https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/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')
|
||||
script(src='js/scripts.js')
|
||||
|
Loading…
Reference in New Issue
Block a user