Smooth Scroll to Top with jQuery

Today, We want to share with you Smooth Scroll to Top with jQuery.In this post we will show you How To Create a Scroll Back To Top Button, hear for jQuery: Scroll to the top of the page we will give you demo and example for implement.In this post, we will learn about Scroll to the top of the page using JavaScript/jQuery with an example.

Smooth Scroll to Top with jQuery

There are the Following The simple About Smooth Scroll to Top with jQuery Full Information With Example and source code.

As I will cover this Post with live Working example to develop javascript scroll to top of div, so the jQuery Smooth Animated Scroll to Top of page example is following below.

Scroll to top JQuery

$(document).ready(function(){    
    $('.TopOfScrollBar').click(function(){
        $('html, body').animate({scrollTop : 0},700);
        return false;
    });
});

using Class

$(window).scroll(function(){
        if ($(this).scrollTop() > 120) {
            $('.TopOfScrollBar').fadeIn();
        } else {
            $('.TopOfScrollBar').fadeOut();
        }
    });

Simple Scroll to top JQuery script

$(document).ready(function(){    
        $(window).scroll(function(){
        if ($(this).scrollTop() > 120) {
            $('.TopOfScrollBar').fadeIn();
        } else {
            $('.TopOfScrollBar').fadeOut();
        }
    });
 
    $('.TopOfScrollBar').click(function(){
        $('html, body').animate({scrollTop : 0},700);
        return false;
    });
 
});

Web Programming Tutorials Example with Demo

Read :

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about Smooth Scroll to Top with jQuery.
I would like to have feedback on my infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.


Related FAQ

Here are some more FAQ related to this Article:

  1.   Download Remote File via PHP CURL
  2.   sticky Scroll Back to Top Button using jQuery and CSS
  3.   Vuejs color picker Plugins With Examples
  4.   Laravel Add active class to Nav Menu System
  5.   PHP Laravel Get current User Information
  6.   Simple Scroll Back to Top Plugin Examples with demo
  7.   Preview Image before Upload using vuejs
  8.   jQuery get value of selected radio button
  9.   AngularJS Datepicker Example Code With Demo
  10.   Angularjs Selectors component - queryselector