Just copy and paste the below codes above </body>
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js' type='text/javascript'/>
<!-- Back to top -->
<a href='#' style='display:scroll;position:fixed;bottom:5px;right:5px;' title='Back to Top'><img onclick='MGJS.goTop();return false;' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgJe5IWzf2wwCLp593pmp0L3GWDC0cu2DEIkuj3OuVM1pVRYrEPnB63DqQxC8oEx40awhyphenhyphenkRz7Fag26Cwb5aHBui5ITWRjwHJULkuv1_BpqM9zm1L72CJkI4lliycL0aFVugz3zDGADyw/s1600/back-to-top.gif'/></a>
Other option to add back to top button is using the below codes.
The different is, you add the codes above / before </head > tag.
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js' type='text/javascript'></script><script type='text/javascript'>$(function(){$(window).scroll(function(){if($(this).scrollTop()!=0){$("#noop-top").fadeIn()}else{$("#noop-top").fadeOut()}});$("#noop-top").click(function(){$("body,html").animate({scrollTop:0},1000);return false})});</script><a id='noop-top' style='display: none; position: fixed; bottom: 75px; right:50%; cursor:pointer;font:12px arial;'><img height='75px' src='http://2.bp.blogspot.com/-Aej3E3_bkQM/UhyP4lG5jvI/AAAAAAAABzU/N8ybh8jvkUs/s1600/Top%2BPage.png ' title='Top Page' width='75px'/></a>
Note: The codes in blue are free for you to customize e.g changing the image with your own or adjust the position and size of the button you use.
Other simpler way to put back to top / scroll to top feature is by adding script code.
This script is taken from a BTDesigner.
You only need to copy and paste these code above </body> (It is located at almost bottom end of your template codes above </html> )
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js' type='text/javascript'/>
<script src='http://arrow.scrolltotop.com/arrow89.js' type='text/javascript'/>
The choice which one you like to use for your blog is yours!. Happy blogging! :)))
0 komentar:
Posting Komentar