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...")
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) > 90){
height = height - 70;
height = height - 70;
-
if(parseInt(document.body.scrollTop) > 190){
+
if(parseInt(document.documentElement.scrollTop+document.body.scrollTop) > 190){
height = height - 70;
height = height - 70;
}
}
Line 25: Line 25:
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>

Revision as of 03:26, 26 September 2012