Difference between revisions of "Team:TU Delft/Header Test"
Line 354: | Line 354: | ||
</script> | </script> | ||
<script> | <script> | ||
+ | $(document).ready(function() { | ||
+ | |||
+ | $("a.sub-nav-item").click(function() { | ||
+ | $("html, body").animate({ | ||
+ | scrollTop: $($(this).attr("href")).offset().top + "px" | ||
+ | }, { | ||
+ | duration: 500, | ||
+ | easing: "swing" | ||
+ | }); | ||
+ | return false; | ||
+ | }); | ||
+ | }); | ||
$('a').click(function(){ | $('a').click(function(){ | ||
$('html, body').animate({ | $('html, body').animate({ |
Revision as of 13:00, 28 July 2015