How to add back to top button

To add back to top button in your website add this in footer.php file of your theme

[php]<pre lang="php"><!–back to top–><script type="text/javascript">// <![CDATA[

// hide #back-top first

// fade in #back-top
$(function () {
$(window).scroll(function () {
if ($(this).scrollTop() > 100) {
} else {
$(‘#back-top a’).bind("mouseover", function(){
var color = $(‘#back-top’).css("background-color");

$(‘#back-top’).css("background", "#999");

$(this).bind("mouseout", function(){
$(‘#back-top’).css("background", color);
// scroll body to 0px on click
$(‘#back-top a’).click(function () {
scrollTop: 0
}, 800);
return false;

// ]]></script>
<div id="back-top" style="position: fixed; width: 40px;
bottom: 30px; right: 30px; float: right; display: block;
text-align: center; background: #CCC; padding: 3px 3px;">
<a href="#top"><span style="display: block;">
<img alt="" src=""
width="25" align="absmiddle" /></span>UP</a></div><p>
<!– end back to top–></p>
You can show your own image also upload an image and change image link .


মন্তব্য সমুহ

সম্পর্কিত পোষ্ট =>  তারে কই বড় বাজিকর
মিতা- এর আরো পোষ্ট দেখুন →
রেটিং করুনঃ
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)