Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $.fn.scrollView = function () {
- return this.each(function () {
- $('html, body').animate({
- scrollTop: $(this).offset().top
- }, 1000);
- });
- };
- $(function() {
- /**
- * Scroll to the top
- */
- $("#to-the-top").on("click", function(e) {
- e.preventDefault();
- $('header').scrollView();
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement