update code comments in scripts
This commit is contained in:
parent
28f356391c
commit
0bcdad5961
11
dist/js/scripts.js
vendored
11
dist/js/scripts.js
vendored
@ -6,17 +6,17 @@
|
||||
(function ($) {
|
||||
"use strict"; // Start of use strict
|
||||
|
||||
// Smooth scrolling using jQuery easing
|
||||
// Smooth scrolling using anime.js
|
||||
$('a.js-scroll-trigger[href*="#"]:not([href="#"])').on('click', function () {
|
||||
if (
|
||||
location.pathname.replace(/^\//, "") ==
|
||||
this.pathname.replace(/^\//, "") &&
|
||||
this.pathname.replace(/^\//, "") &&
|
||||
location.hostname == this.hostname
|
||||
) {
|
||||
var target = $(this.hash);
|
||||
target = target.length
|
||||
? target
|
||||
: $("[name=" + this.hash.slice(1) + "]");
|
||||
target = target.length ?
|
||||
target :
|
||||
$("[name=" + this.hash.slice(1) + "]");
|
||||
if (target.length) {
|
||||
anime({
|
||||
targets: 'html, body',
|
||||
@ -52,4 +52,5 @@
|
||||
navbarCollapse();
|
||||
// Collapse the navbar when page is scrolled
|
||||
$(window).on('scroll', navbarCollapse);
|
||||
|
||||
})(jQuery); // End of use strict
|
||||
|
@ -1,17 +1,17 @@
|
||||
(function ($) {
|
||||
"use strict"; // Start of use strict
|
||||
|
||||
// Smooth scrolling using jQuery easing
|
||||
// Smooth scrolling using anime.js
|
||||
$('a.js-scroll-trigger[href*="#"]:not([href="#"])').on('click', function () {
|
||||
if (
|
||||
location.pathname.replace(/^\//, "") ==
|
||||
this.pathname.replace(/^\//, "") &&
|
||||
this.pathname.replace(/^\//, "") &&
|
||||
location.hostname == this.hostname
|
||||
) {
|
||||
var target = $(this.hash);
|
||||
target = target.length
|
||||
? target
|
||||
: $("[name=" + this.hash.slice(1) + "]");
|
||||
target = target.length ?
|
||||
target :
|
||||
$("[name=" + this.hash.slice(1) + "]");
|
||||
if (target.length) {
|
||||
anime({
|
||||
targets: 'html, body',
|
||||
@ -47,4 +47,5 @@
|
||||
navbarCollapse();
|
||||
// Collapse the navbar when page is scrolled
|
||||
$(window).on('scroll', navbarCollapse);
|
||||
|
||||
})(jQuery); // End of use strict
|
||||
|
Loading…
Reference in New Issue
Block a user