Skip to content

Commit

Permalink
fix: follow relative and absolute links in SmoothScroll #11506
Browse files Browse the repository at this point in the history
Closes #11506
  • Loading branch information
ncoden committed Sep 20, 2018
1 parent 26aad11 commit 140abba
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 140abba

Please sign in to comment.