Difference between revisions of "Team:Brasil-USP/Templates/Foot"

Line 3: Line 3:
 
     <div class="container">
 
     <div class="container">
 
       <footer>
 
       <footer>
<p class="pull-right"><a href="#top">Back to top</a></p>
 
 
<p>&copy; 2015 Brasil-USP Team
 
<p>&copy; 2015 Brasil-USP Team
 
&middot; <a href="https://2015.igem.org/">iGEM</a>
 
&middot; <a href="https://2015.igem.org/">iGEM</a>
Line 10: Line 9:
 
       </footer>
 
       </footer>
 
     </div>
 
     </div>
     <br /><br />
+
     <a class".back-to-top" href="#top">Back to top</a>
 
+
 
 
     <!-- Bootstrap core JavaScript
 
     <!-- Bootstrap core JavaScript
 
     ================================================== -->
 
     ================================================== -->
Line 43: Line 42:
 
         }
 
         }
 
       });
 
       });
 +
     
 +
      var offset = 400;
 +
      var duration = 500;
 +
      jQuery(window).scroll(function() {
 +
        if (jQuery(this).scrollTop() > offset) {
 +
            jQuery('.back-to-top').fadeIn(duration);
 +
        } else {
 +
            jQuery('.back-to-top').fadeOut(duration);
 +
        }
 +
      });
 +
   
 +
    jQuery('.back-to-top').click(function(event) {
 +
        event.preventDefault();
 +
        jQuery('html, body').animate({scrollTop: 0}, duration);
 +
        return false;
 +
    })
 
     });
 
     });
 
     </script>
 
     </script>
 
      
 
      
 
</html>
 
</html>

Revision as of 14:23, 15 September 2015

Back to top