Difference between revisions of "Team:Brasil-USP/Templates/Foot"
Thmosqueiro (Talk | contribs) |
Thmosqueiro (Talk | contribs) |
||
(30 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
<div class="container"> | <div class="container"> | ||
− | < | + | <div id="footer"> |
− | + | ||
<p>© 2015 Brasil-USP Team | <p>© 2015 Brasil-USP Team | ||
· <a href="https://2015.igem.org/">iGEM</a> | · <a href="https://2015.igem.org/">iGEM</a> | ||
· <a href="http://www.ifsc.usp.br/english/">IFSC</a> | · <a href="http://www.ifsc.usp.br/english/">IFSC</a> | ||
· <a href="http://www.usp.br">USP</a></p> | · <a href="http://www.usp.br">USP</a></p> | ||
− | </ | + | </div> |
</div> | </div> | ||
− | < | + | <a class="back-to-top" href="#top">Back to top</a> |
− | + | ||
<!-- Bootstrap core JavaScript | <!-- Bootstrap core JavaScript | ||
================================================== --> | ================================================== --> | ||
<!-- Placed at the end of the document so the pages load faster --> | <!-- Placed at the end of the document so the pages load faster --> | ||
− | <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> | + | <!-- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> --> |
− | <script src="https://2015.igem.org/wiki/index.php?title=Team:Brasil-USP/Templates/js/ | + | |
+ | <script type="text/javascript" src="https://2015.igem.org/wiki/index.php?title=Team:Brasil-USP/Templates/js/bootstrapmin&action=raw&ctype=text/javascript"></script> | ||
+ | <script> | ||
+ | $(document).ready(function() | ||
+ | { | ||
+ | $('a[href*=#]').each(function() | ||
+ | { | ||
+ | if ( location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') ) | ||
+ | { | ||
+ | this.hash.replace(/#/,'') | ||
+ | var $targetId = $(this.hash), $targetAnchor = $('[name="' + this.hash.slice(1) +'"]'); | ||
+ | var $target = $targetId.length ? $targetId : $targetAnchor.length ? $targetAnchor : false; | ||
+ | if ($target) | ||
+ | { | ||
+ | if ( $target.attr("class") == "top" ) { var targetOffset = $target.offset().top; } | ||
+ | else { var targetOffset = $target.offset().top - 70; } | ||
+ | |||
+ | $(this).click(function() | ||
+ | { | ||
+ | $("#nav li a").removeClass("active"); | ||
+ | $(this).addClass('active'); | ||
+ | $('html, body').animate({scrollTop: targetOffset}, 1000); | ||
+ | return false; | ||
+ | }); | ||
+ | } | ||
+ | } | ||
+ | }); | ||
+ | |||
+ | var offset = 400; | ||
+ | var duration = 1000; | ||
+ | jQuery('.back-to-top').fadeOut(0); | ||
+ | jQuery(window).scroll(function() { | ||
+ | if (jQuery(this).scrollTop() > offset) { | ||
+ | jQuery('.back-to-top').fadeIn(duration); | ||
+ | } else { | ||
+ | jQuery('.back-to-top').fadeOut(duration); | ||
+ | } | ||
+ | }); | ||
+ | }); | ||
+ | </script> | ||
</html> | </html> |
Latest revision as of 00:37, 18 September 2015