Line 7: | Line 7: | ||
<script> | <script> | ||
− | + | $('a[href^="#"]').on('click', function(event) { | |
− | var | + | |
− | + | var target = $(this.getAttribute('href')); | |
− | + | ||
− | + | if( target.length ) { | |
− | + | event.preventDefault(); | |
− | + | $('html, body').stop().animate({ | |
− | + | scrollTop: target.offset().top | |
− | + | }, 1000); | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
} | } | ||
− | + | ||
+ | }); | ||
Line 65: | Line 57: | ||
− | < | + | <a href="#bottom" id="top"><img src="https://static.igem.org/mediawiki/2017/8/8c/T--William_and_Mary--arrowright.jpeg" height = "80"/></a> |
− | + | ||
+ | |||
Line 82: | Line 75: | ||
<br/> | <br/> | ||
− | |||
− | |||
− | |||
<center> | <center> | ||
− | <img src="https://static.igem.org/mediawiki/2017/d/de/T--William_and_Mary--greenyellowinfographic.jpeg" height = "2200"/> | + | <a href="#top" id="bottom"><img src="https://static.igem.org/mediawiki/2017/d/de/T--William_and_Mary--greenyellowinfographic.jpeg" height = "2200"/></a> |
</center> | </center> | ||
</div> | </div> |
Revision as of 01:58, 2 October 2017