Difference between revisions of "Template:BIT-China"

Line 191: Line 191:
 
<script src="https://2017.igem.org/Team:BIT-China/js/basic/jquery-2-0-0?action=raw&ctype=text/javascript"></script>
 
<script src="https://2017.igem.org/Team:BIT-China/js/basic/jquery-2-0-0?action=raw&ctype=text/javascript"></script>
 
     <script src="https://2017.igem.org/Team:BIT-China/js/bootstrap3-3-7?action=raw&ctype=text/javascript"></script>
 
     <script src="https://2017.igem.org/Team:BIT-China/js/bootstrap3-3-7?action=raw&ctype=text/javascript"></script>
<script>
 
  
$(document).ready(function (e) {
 
 
    window.onscroll = function(e){
 
 
        var e =e || window.event;
 
        var scrolltop=document.documentElement.scrollTop||document.body.scrollTop;
 
 
        $navbar = $("nav.nav_bar");
 
        if(scrolltop > 80){
 
            $navbar.css({'position': 'fixed','opacity': 0, 'display': 'none' });
 
            $("#left_nav").css({'position': 'fixed','left': 0,'top': 0, 'height': '100%'});
 
        }else{
 
            $navbar.css({'position': 'relative','opacity': 1, 'display': 'block'});
 
            $("#left_nav").css({'position': 'relative','height': '100%'});
 
        }
 
 
    };
 
});
 
</script>
 
 
</body>
 
</body>
 
</html>
 
</html>

Revision as of 09:06, 6 October 2017

BIT-CHINA