Difference between revisions of "Team:Valencia UPV/Templates:headUPV"
m |
m |
||
Line 20: | Line 20: | ||
--> | --> | ||
− | + | <script> | |
+ | $(document).ready(function () { | ||
+ | $(window).scroll(function () { | ||
+ | if ($(this).scrollTop() > 100) { | ||
+ | $('.scrollup').fadeIn(); | ||
+ | } else { | ||
+ | $('.scrollup').fadeOut(); | ||
+ | } | ||
+ | }); | ||
+ | $('.scrollup').click(function () { | ||
+ | $("html, body").animate({ | ||
+ | scrollTop: 0 | ||
+ | }, 600); | ||
+ | return false; | ||
+ | }); | ||
+ | }); | ||
+ | </script> | ||
</head> | </head> | ||
</html> | </html> |
Revision as of 23:53, 14 September 2015