Team:Tianjin/frame/modeling

From 2012.igem.org

(Difference between revisions)
Line 18: Line 18:
}}
}}
<html>
<html>
 +
<head>
<script type="text/javascript">
<script type="text/javascript">
$(document).ready(function()
$(document).ready(function()
Line 28: Line 29:
});
});
});
});
 +
</script>
 +
 +
<script type="text/javascript">
 +
function getScrollTop() {
 +
    var scrollPos;
 +
    if (window.pageYOffset) {
 +
        scrollPos = window.pageYOffset;
 +
    }
 +
    else if (document.compatMode && document.compatMode != 'BackCompat') {
 +
        scrollPos = document.documentElement.scrollTop;
 +
    }
 +
    else if (document.body) {
 +
        scrollPos = document.body.scrollTop;
 +
    }
 +
    if(scrollPos < 200){
 +
document.getElementById("secondpane").className=" ";
 +
}
 +
else{
 +
document.getElementById("secondpane").className="menu_list";
 +
}
 +
}
 +
window.onscroll=getScrollTop;
</script>
</script>
<style type="text/css">
<style type="text/css">
-
.menu_list {
+
#secondpane {color:#fff;
-
width: 170px;
+
width: 180px;
-
margin:5px;
+
}
}
 +
.menu_list {
 +
position:fixed;top:0;}
.menu_head {
.menu_head {
padding: 5px 10px;
padding: 5px 10px;
Line 80: Line 104:
</style>
</style>
-
 
+
</head>
-
<div class="modmenu" style="float:left;">
+
<body>
-
   <div class="menu_list" id="secondpane"> <!--Code for menu starts here-->
+
<div style="float:left;">
 +
   <div id="secondpane"> <!--Code for menu starts here-->
<p class="menu_head">Header-1</p>
<p class="menu_head">Header-1</p>
<div class="menu_body">
<div class="menu_body">
Line 121: Line 146:
   </div>      <!--Code for menu ends here-->
   </div>      <!--Code for menu ends here-->
</div>
</div>
 +
</body>
</html>
</html>
<div id="text-content">
<div id="text-content">

Revision as of 17:04, 21 September 2012