Skip to content

Commit

Permalink
modified navigation scrolling for mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
somratpro committed Feb 23, 2021
1 parent 0e86fcc commit 6de4f45
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions assets/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,6 @@ $(window).on('load', function () {
jQuery(function ($) {
"use strict";


/* ========================================================================= */
/* Auto close Navbar when click on link
/* ========================================================================= */

$('.navbar-collapse a').click(function () {
$(".navbar-collapse").collapse('hide');
});


/* ========================================================================= */
/* lazy load initialize
/* ========================================================================= */
Expand Down Expand Up @@ -80,6 +70,16 @@ jQuery(function ($) {
/* animation scroll js
/* ========================================================================= */



function myFunction(x) {
if (x.matches) {
var topOf = 50
} else {
var topOf = 350
}
}

var html_body = $('html, body');
$('nav a, .page-scroll').on('click', function () { //use page-scroll class in any HTML tag for scrolling
if (location.pathname.replace(/^\//, '') === this.pathname.replace(/^\//, '') && location.hostname === this.hostname) {
Expand Down

0 comments on commit 6de4f45

Please sign in to comment.