Team:Tianjin/frame/modeling

From 2012.igem.org

(Difference between revisions)
Line 19: Line 19:
<html>
<html>
<script type="text/javascript">
<script type="text/javascript">
-
<!--//---------------------------------+
 
-
//  Developed by Roshan Bhattarai
 
-
//  Visit http://roshanbh.com.np for this script and more.
 
-
//  This notice MUST stay intact for legal use
 
-
// --------------------------------->
 
$(document).ready(function()
$(document).ready(function()
{
{
Line 34: Line 29:
});
});
</script>
</script>
 +
<style type="text/css">
<style type="text/css">
.menu_list {
.menu_list {
Line 81: Line 77:
   background:#777777;
   background:#777777;
   }
   }
 +
 +
.modmenu {
 +
POSITION: fixed; WIDTH: 170px;top:0px;
 +
}
</style>
</style>
-
<div style="float:left;">
+
 
 +
<div id="modmenu" style="float:left;">
   <div class="menu_list" id="secondpane"> <!--Code for menu starts here-->
   <div class="menu_list" id="secondpane"> <!--Code for menu starts here-->
<p class="menu_head">Header-1</p>
<p class="menu_head">Header-1</p>
Line 122: Line 123:
   </div>      <!--Code for menu ends here-->
   </div>      <!--Code for menu ends here-->
</div>
</div>
 +
 +
<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 < 100){
 +
document.getElementById("modmenu").className=" ";
 +
}
 +
else{
 +
document.getElementById("modmenu").className="modmenu";
 +
}
 +
}
 +
window.onscroll=getScrollTop;
 +
</script>
</html>
</html>
<div id="text-content">
<div id="text-content">

Revision as of 13:42, 20 September 2012