Skip to content

Commit

Permalink
Use pull request #11510 from ncoden/fix/smooth-scroll-absolute-links-…
Browse files Browse the repository at this point in the history
…11506 for v6.5.0

140abba fix: follow relative and absolute links in SmoothScroll #11506

Signed-off-by: Nicolas Coden <nicolas@ncoden.fr>
  • Loading branch information
ncoden committed Sep 25, 2018
1 parent 197f9f6 commit f5afa1d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions js/foundation.smoothScroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down

0 comments on commit f5afa1d

Please sign in to comment.