Template:Team:SJTU-BioX-Shanghai/top-nav

From 2014.igem.org

(Difference between revisions)
m
Line 46: Line 46:
             <div style="clear:both;"></div>
             <div style="clear:both;"></div>
         </div>
         </div>
 +
<link rel="stylesheet" type="text/css" href="https://2014.igem.org/Team:SJTU-BioX-Shanghai/index.css?action=raw&ctype=text/css">
 +
<link rel="stylesheet" type="text/css" href="https://2014.igem.org/Team:SJTU-BioX-Shanghai/component.css?action=raw&ctype=text/css">
 +
<script type="text/javascript" src="https://2014.igem.org/Team:SJTU-BioX-Shanghai/jquery-1.11.1.min.js?action=raw&ctype=text/javascript"></script>
 +
<script type="text/javascript" src="https://2014.igem.org/Team:SJTU-BioX-Shanghai/untitled2.js?action=raw&ctype=text/javascript"></script>
 +
<script type="text/javascript" src="https://2014.igem.org/Team:SJTU-BioX-Shanghai/modernizr.custom.js?action=raw&ctype=text/javascript"></script>
 +
 +
<script type="text/javascript">
 +
 +
            var aa = $(window).width();
 +
            var bb = document.getElementsByTagName("header")[0];
 +
            var cc = document.getElementById("wrap");
 +
           
 +
            $(document).scroll(function(){
 +
                var ee = cc.getBoundingClientRect().top;
 +
                if(ee < 0){
 +
                    cc.setAttribute("class","sticky");
 +
                    bb.setAttribute("class","sticky");
 +
                } else {
 +
                    cc.setAttribute("class","");
 +
                    bb.setAttribute("class","");
 +
                }
 +
            });
 +
 +
            var menu = new cbpTooltipMenu(document.getElementById('cbp-tm-menu'));
 +
</script>
 +
</div>
</html>
</html>

Revision as of 00:17, 13 October 2014