From: Nicolas Coden Date: Thu, 20 Sep 2018 21:46:56 +0000 (+0200) Subject: fix: follow relative and absolute links in SmoothScroll #11506 X-Git-Tag: v6.6.0~3^2~93^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F11510%2Fhead;p=thirdparty%2Ffoundation%2Ffoundation-sites.git fix: follow relative and absolute links in SmoothScroll #11506 Closes https://github.com/zurb/foundation-sites/issues/11506 --- 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');