Advertisement
yagami07

Untitled

Feb 8th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. $(document).ready(function(){
  2.  
  3. $(window).scroll(function(){
  4.  
  5. if ($(this).scrollTop() > 100){
  6. $('#ir-arriba').fadeIn('1000');
  7. }
  8.  
  9. else
  10.  
  11. {
  12. $('#ir-arriba').fadeOut('1000');
  13.  
  14. }
  15. });
  16.  
  17. $('#ir-arriba').click(function(){
  18.  
  19. $('body, html').animate({
  20. scrollTop:0
  21. });
  22.  
  23. });
  24.  
  25.  
  26.  
  27. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement