From 140abba37384784f2c6fc38d0ca8b1812c0eba16 Mon Sep 17 00:00:00 2001 From: Nicolas Coden Date: Thu, 20 Sep 2018 23:46:56 +0200 Subject: [PATCH] fix: follow relative and absolute links in SmoothScroll #11506 Closes https://github.com/zurb/foundation-sites/issues/11506 --- js/foundation.smoothScroll.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/js/foundation.smoothScroll.js b/js/foundation.smoothScroll.js index 1d692ba45..a90e0965a 100644 --- a/js/foundation.smoothScroll.js +++ b/js/foundation.smoothScroll.js @@ -48,10 +48,8 @@ class SmoothScroll extends Plugin { // click handler function. var handleLinkClick = function(e) { - // exit function if the event source isn't coming from an anchor with href attribute starts with '#' - if(!$(this).is('a[href^="#"]')) { - return false; - } + // Follow the link it does not point to an anchor. + if (!$(this).is('a[href^="#"]')) return; var arrival = this.getAttribute('href'); -- 2.47.2