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