Team:Tianjin/frame/modeling

From 2012.igem.org

(Difference between revisions)
Line 29: Line 29:
});
});
</script>
</script>
-
<script type="text/javascript">
+
 
-
$(function(){
+
-
var navH = $(".menu_list").offset().top;
+
-
$(window).scroll(function(){
+
-
var scroH = $(this).scrollTop();
+
-
if(scroH>=navH){
+
-
$(".menu_list").css({"position":"fixed","top":0,"width": 170px,"left":"50%","margin-left":"-200px"});
+
-
}else if(scroH<navH){
+
-
$(".menu_list").css({"position":"static","width": 170px,"margin":"0 auto"});
+
-
}
+
-
})
+
-
})
+
-
</script>
+
<style type="text/css">
<style type="text/css">
.menu_list {
.menu_list {
width: 170px;
width: 170px;
 +
margin:5px;
}
}
.menu_head {
.menu_head {

Revision as of 16:43, 20 September 2012