Template:12SJTU floatnav foot

From 2012.igem.org

(Difference between revisions)
(Created page with "<html> </tr> </table> </div> <script type="text/javascript"> var id=function(o){return document.getElementById(o)} var scroll=function (o){ var space=id(o).of...")
 
(One intermediate revision not shown)
Line 15: Line 15:
var height =document.documentElement.scrollTop+document.body.scrollTop+space;
var height =document.documentElement.scrollTop+document.body.scrollTop+space;
var top = parseInt(id(o).style.top);
var top = parseInt(id(o).style.top);
-
if(parseInt(document.body.scrollTop) > 90){
+
if(parseInt(document.documentElement.scrollTop+document.body.scrollTop) > 98){
-
height = height - 70;
+
height = height - 100;
-
if(parseInt(document.body.scrollTop) > 190){
+
if(parseInt(document.documentElement.scrollTop+document.body.scrollTop) > 198){
-
height = height - 70;
+
height = height - 100;
 +
if(parseInt(document.documentElement.scrollTop+document.body.scrollTop) > 298){
 +
height = height - 100;
 +
}
}
}
}
}
Line 25: Line 28:
id(o).style.top=goTo+'px';
id(o).style.top=goTo+'px';
}
}
-
//else{if(roll) clearInterval(roll);}
+
},30);
-
},20);
+
}()
}()
}
}
-
scroll('box1');
+
scroll('12SJTU_floatnav');
-
scroll('box2');
+
</script>
</script>
</body>
</body>
</html>
</html>

Latest revision as of 17:01, 25 October 2012