Template:Team:Sheffield/NavigationBar
From 2014.igem.org
(Difference between revisions)
Line 27: | Line 27: | ||
<script> | <script> | ||
$(function() { | $(function() { | ||
- | $(' | + | $( '.inlink' ).on('click', function(event) { |
- | + | event.preventDefault(); | |
- | + | var target = "#" + $(this).data('target'); | |
- | + | $('html, body').animate({ | |
- | + | scrollTop: $(target).offset().top | |
- | + | }, 2000); | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
}); | }); | ||
</script> | </script> |
Revision as of 10:52, 4 October 2014