Scroll to top link using jQuery or Back to Top link using jQuery
<html> <head> <title></title> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function() { $('a[href=#top]').click(function() { $('html, body').animate({ scrollTop: 0 }, 'slow'); return false; }); }); </script> </head> <body> <div id="top"></div>this is sample example for going to top from botton of blog <br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />v <a href="#top" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-IVi0tGshOjg/T82gX-mmdGI/AAAAAAAAALs/gAbNIGEsfFM/s1600/go_top+.png" /></a> </body> </html>
One Reply to “Scroll to top link using jQuery or Back to Top link using jQuery”
Build, battle, and dominate the leaderboard Lucky Cola