Team:Aalto-Helsinki/footer
From 2014.igem.org
(Difference between revisions)
Vaakapallo (Talk | contribs) |
|||
Line 68: | Line 68: | ||
</footer> | </footer> | ||
</body> | </body> | ||
+ | <script type="text/javascript"> | ||
+ | $(document).ready(function(){ | ||
+ | $('a[href^="#"]').on('click',function (e) { | ||
+ | e.preventDefault(); | ||
+ | |||
+ | var target = this.hash, | ||
+ | $target = $(target); | ||
+ | |||
+ | $('html, body').stop().animate({ | ||
+ | 'scrollTop': $target.offset().top | ||
+ | }, 900, 'swing', function () { | ||
+ | window.location.hash = target; | ||
+ | }); | ||
+ | }); | ||
+ | }); | ||
+ | </script> | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
$('.extrabar').affix({ | $('.extrabar').affix({ |
Revision as of 07:17, 5 September 2014