Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
  • JQuery Simple Scroll To Top

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 354
    Comment on it

    In this tutorial, you will learn that how to add scroll to top in any of the page. As we see in many websites the scroll top function. Its very helpful for users to go to the top of the page automatically without scrolling. It appears when the person scroll down the page and disappear when the visitor is already on the top of the page.

    You can do this by applying some JavaScript code and CSS code .

    Here is the JavaScript code you can use for scroll to top ->

    <script src=""></script>
        //fade in/out based on scrollTop value
        $(window).scroll(function () {
            if ($(this).scrollTop() > 0) {
            } else {
        // scroll body to 0px on click
        $('#scroller').click(function () {
                scrollTop: 0
            }, 400);
            return false;


    This is the CSS code below for the scroll to top button.


        position: fixed;   
        /**position the scroller**/
        bottom: 30px;  
        /**arrow image**/
        background: transparent url(put scoll top png url) no-repeat left top; 
        width: 32px;
        height: 32px;
        cursor: pointer;
        /**hide it first**/


 0 Comment(s)

Sign In

Sign up using

Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: