Skip to content

Commit

Permalink
Merge pull request #2 from jmbb/patch-1
Browse files Browse the repository at this point in the history
Show button when landed on page with anchor
  • Loading branch information
bluezed committed May 11, 2016
2 parents 5e22063 + 87ebc4f commit 3e3ca28
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions assets/js/scroll-top.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ $(function(){
} else if (pos < scrollerTriggerPoint && btnScroller.is(':visible')) {
btnScroller.fadeOut();
}
});
}).scroll();

btnScroller.on('click', function(e) {
e.preventDefault();
$('html, body').animate({ scrollTop: 0 }, 300);
});

});
});

0 comments on commit 3e3ca28

Please sign in to comment.