Thursday, June 4, 2015

jQuery -Scroll to top and scroll to down of page in jquery

jQuery -Scroll to top and scroll to down of page in jquery

<script>
    jQuery (document).ready(function() {

   jQuery ('#gototop ').click(function(){
    jQuery ('html, body').animate({scrollTop:0}, 'slow');
    return false;
    });

 jQuery ('#gotobottom').click(function(){
    jQuery ('html, body').animate({scrollTop:jQuery (document).height()}, 'slow');
    return false;
    });
    });
    </script

No comments :

Post a Comment