Ver Mensaje Individual
  #1 (permalink)  
Antiguo 19/02/2014, 07:50
rakshaka
 
Fecha de Ingreso: mayo-2009
Mensajes: 166
Antigüedad: 15 años
Puntos: 2
ScrollBottom que desaparece.

Hola muchachos tengo éste código y necesito que el boton:

<a href="#" id="scroll-to-bottom" class="scroll-btn bottom"> Scroll <span></span> </a>

Haga efecto de scroll hacia abajo y desaparezca al hacerlo. No puedo dar con el script correcto.


intenté con esto pero no hay caso:

Código Javascript:
Ver original
  1. Query(document).ready(function() {
  2.     var offset = 220;
  3.     var duration = 500;
  4.     jQuery(window).scroll(function() {
  5.         if (jQuery(this).scrollBottom() > offset) {
  6.             jQuery('.scroll-to-bottom').fadeIn(duration);
  7.         } else {
  8.             jQuery('.scroll-to-bottom').fadeOut(duration);
  9.         }
  10.     });
  11.    
  12.     jQuery('.back-to-top').click(function(event) {
  13.         event.preventDefault();
  14.         jQuery('html, body').animate({scrollBottom: 100}, duration);
  15.         return false;
  16.     })
  17. });

A ver si pueden ayudarme!