Direct access

Are you a new member from Brush-Land or by Forumotion? You can have many options for your account! Register right now on the new Brush-Land!

Login

  • I have forgot my password | Register

Register

  • Weak
    Normal
    Strong
     



Puregroups.inc


You are not connected. Please login or register

Scroll down button


Irian
Scroll down button Empty
Published by Irian
Post published on Sat Oct 15, 2011 1:00 pm

http://puregroups.co.cc



Hi all
well,

HTML:
put this where you want
Code:
<div id="top-button"><a href="" class="scrolltop">top</a></div>
jQuery:
Code:
<script>jQuery(document).ready(function(){
   jQuery(function () {
      jQuery('#top-button').hide();
      jQuery(window).scroll(function () {
         if (jQuery(this).scrollTop() >= 500) {
            jQuery('#top-button').fadeIn();
         } else {
            $('#top-button').fadeOut();
         }
      });
   });
                  jQuery('#top-button a').click(function () {
                        jQuery('body,html').animate({
                            scrollTop: 0
                        }, 800);
                        return false;
                    });
});</script>

CSS:
Code:
#top-button {
   position: fixed;
   bottom: 200px;
   right: 6%;
   width: 32px;
   height: 32px;
   text-indent: -9999px;
   }
   #top-button a {
   display: block;
   width: 32px;
   height: 32px;
   background: url(http://cdn2.iconfinder.com/data/icons/gnomeicontheme/32x32/actions/stock_top.png) top center no-repeat;
   overflow: hidden;
   border: none;
   }

bye


 



Permissions in this forum:
You cannot reply to topics in this forum

ForumotionPuregroupsKalleankafansite - Ankornas paradisScroll down button Eng1011Kalleankafansite - Ankornas paradis