Template:12SJTU floatnav foot
From 2012.igem.org
(Difference between revisions)
Huanan1991 (Talk | contribs) (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...") |
Huanan1991 (Talk | contribs) |
||
(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) > | + | if(parseInt(document.documentElement.scrollTop+document.body.scrollTop) > 98){ |
- | height = height - | + | height = height - 100; |
- | if(parseInt(document.body.scrollTop) > | + | if(parseInt(document.documentElement.scrollTop+document.body.scrollTop) > 198){ |
- | height = height - | + | 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'; | ||
} | } | ||
- | + | },30); | |
- | }, | + | |
}() | }() | ||
} | } | ||
- | scroll(' | + | scroll('12SJTU_floatnav'); |
- | + | ||
</script> | </script> | ||
</body> | </body> | ||
</html> | </html> |
Latest revision as of 17:01, 25 October 2012