From 9be7c64ac429525b6a8a38be5c9089cddc93892f Mon Sep 17 00:00:00 2001 From: Moritz Date: Thu, 18 Jan 2018 17:29:06 -0600 Subject: [PATCH] added some other changes --- scrollimate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scrollimate.js b/scrollimate.js index 8a390e0..4226f3f 100644 --- a/scrollimate.js +++ b/scrollimate.js @@ -201,7 +201,7 @@ var scrollimate = (function( window, $ ){ console.log('saScroll initiated'); $('[href^="#"]').click(function(){ var $this = $(this); - if( $($this.attr('href')).length ){ + if( $($this.attr('href')).length && $this.attr('href') !== '#' ){ var smoothAnchorScrollTime = 500 + (Math.floor($($this.attr("href")).offset().top))/2; var scrollEvents = "scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove"; var $page = $('html, body');