Latest news
Home » Internet » Jquery code for Animated Scroll to Top

Jquery code for Animated Scroll to Top

Create a div with class name gotop and Simply Copy paste the jquery code in betweenfor getting a scroll top functionality in a webpage.

<div class=’gotop’>Scroll To Top</div>

Jquery Code
jQuery(window).scroll(function(){
if(jQuery(this).scrollTop()>1){jQuery('.gotop').css({bottom:"0px"})}else{jQuery('.gotop').css({bottom:"-100px"})}});$(window).ready(function(){$('.gotop').click(function(e){e.preventDefault();$('html,body').animate({scrollTop:0},700).animate({scrollTop:60},300).animate({scrollTop:0},400)})})(jQuery);

Searches related to Scroll to Top
scroll to top jquery,
javascript scroll to top,
scroll to top bottom of the photos,
scroll to top photo,
scroll to top in blogger,
back to top jquery

Leave a Reply

x

Check Also

What is SSL Certificate and advantages of SSL

SSL is a short form for Secure Sockets Layer. SSL certificates guarantee clients and visitors ...