Team:Evry/Notebook/test
From 2014.igem.org
(Difference between revisions)
Line 1: | Line 1: | ||
- | |||
<html> | <html> | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | + | <!-- Remonter la page --> | |
+ | <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(){ | |
- | window. | + | 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="https://static.igem.org/mediawiki/2013/7/78/IronMan.png" width="40" /> | |
- | + | </div> | |
+ | <!-- menu latéral --> | ||
+ | <script type="text/javascript"> | ||
+ | $(function() { | ||
+ | $(document).scroll(function() { | ||
+ | |||
+ | if($(document).scrollTop()>=180) | ||
+ | { | ||
+ | $('aside').css('position','fixed').css('top','40px').css('box-shadow','0px 3px 6px #1c1a19'); | ||
+ | |||
+ | } | ||
+ | else | ||
+ | { | ||
+ | $('aside').css('position','static').css('float','left').css('margin-left','-0.3%').css('box-shadow','none'); | ||
+ | } | ||
+ | }); | ||
+ | }); | ||
</script> | </script> | ||
- | + | <!-- Menu horizontal --> | |
+ | <script type="text/javascript"> | ||
+ | $(function() { | ||
+ | $(document).scroll(function() { | ||
+ | |||
+ | if($(document).scrollTop()>=180) | ||
+ | { | ||
+ | $('#menu').css('position','fixed').css('top','0px').css('width','100%'); | ||
+ | $('#menu a span').css('display','none'); | ||
+ | $('#menu ul').css('top','1.5em').css('top','1.5vw'); | ||
+ | $('#menu #igem-link').css('width','1.5%'); | ||
+ | } | ||
+ | else | ||
+ | { | ||
+ | $('#menu').css('position','static'); | ||
+ | $('#menu a span').css('display','block'); | ||
+ | $('#menu ul').css('top','5.5em').css('top','5.5vw'); | ||
+ | $('#menu #igem-link').css('width','4%'); | ||
+ | } | ||
+ | }); | ||
+ | }); | ||
+ | </script> | ||
+ | |||
+ | <!-- Onglet Notebook --> | ||
+ | |||
+ | <script type="text/javascript"> | ||
+ | $(function() { | ||
+ | $(document).scroll(function() { | ||
+ | |||
+ | if($(document).scrollTop()>=160) | ||
+ | { | ||
+ | $('.onglet').css('position','fixed').css('margin-left','8px').css('top','5%'); | ||
+ | $('.onglet-left').css('position','fixed').css('top','5%'); | ||
+ | } | ||
+ | else | ||
+ | { | ||
+ | $('.onglet').css('position','absolute').css('margin-left','0px').css('top','auto'); | ||
+ | $('.onglet-left').css('position','absolute').css('top','auto'); | ||
+ | } | ||
+ | |||
+ | }); | ||
+ | }); | ||
+ | </script> | ||
- | |||
- | |||
- | + | </html | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + |
Revision as of 09:52, 20 August 2014