Team:Evry/template v1
From 2012.igem.org
(Difference between revisions)
Line 6: | Line 6: | ||
<script type="text/javascript">writeHeader();</script> | <script type="text/javascript">writeHeader();</script> | ||
</header> | </header> | ||
+ | |||
+ | <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> | ||
+ | <script type="text/javascript"> | ||
+ | $(function(){ | ||
+ | $('#btn_up').click(function() { | ||
+ | $('html,body').animate({scrollTop: 0}, 'slow'); | ||
+ | }); | ||
+ | |||
+ | $(window).scroll(function(){ | ||
+ | if($(window).scrollTop()<500){ | ||
+ | $('#btn_up').fadeOut(); | ||
+ | }else{ | ||
+ | $('#btn_up').fadeIn(); | ||
+ | } | ||
+ | }); | ||
+ | }); | ||
+ | </script> | ||
+ | <div id="btn_up" style="position: fixed; bottom: 15px; right: 25px; cursor: pointer; display:none;"> | ||
+ | <img alt="Top_arrow" title="Top" src="http://image.noelshack.com/fichiers/2012/26/1341100852-fleche.png" width="40" /> | ||
+ | </div> | ||
+ | |||
</html> | </html> |
Revision as of 12:25, 22 September 2012