Difference between revisions of "Team:Harvard BioDesign/Notebook"
Line 6: | Line 6: | ||
<head> | <head> | ||
<script src="jquery-1.11.3.min.js"></script> | <script src="jquery-1.11.3.min.js"></script> | ||
+ | <script type="text/javascript" src="https://2015.igem.org/Template:Harvard_BioDesign/JS? | ||
+ | action=raw&ctype=text/javascript"></script> | ||
</head> | </head> | ||
− | < | + | <div id="my-timeline" style="height: 150px; border: 1px solid #aaa"></div> |
− | + | ||
− | < | + | <body onload="onLoad();" onresize="onResize();"> |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | <script type="text/ | + | <script> |
− | action=raw&ctype=text/ | + | var tl; |
+ | function onLoad() { | ||
+ | var bandInfos = [ | ||
+ | Timeline.createBandInfo({ | ||
+ | width: "70%", | ||
+ | intervalUnit: Timeline.DateTime.MONTH, | ||
+ | intervalPixels: 100 | ||
+ | }), | ||
+ | Timeline.createBandInfo({ | ||
+ | width: "30%", | ||
+ | intervalUnit: Timeline.DateTime.YEAR, | ||
+ | intervalPixels: 200 | ||
+ | }) | ||
+ | ]; | ||
+ | tl = Timeline.create(document.getElementById("my-timeline"), bandInfos); | ||
+ | } | ||
+ | |||
+ | var resizeTimerID = null; | ||
+ | function onResize() { | ||
+ | if (resizeTimerID == null) { | ||
+ | resizeTimerID = window.setTimeout(function() { | ||
+ | resizeTimerID = null; | ||
+ | tl.layout(); | ||
+ | }, 500); | ||
+ | } | ||
+ | } | ||
+ | </script> | ||
+ | |||
+ | </body> | ||
+ | |||
+ | <link rel="stylesheet" type="text/css" | ||
+ | href="https://2015.igem.org/Template:Harvard_BioDesign/CSS?action=raw&ctype=text/css" /> | ||
</html> | </html> |
Revision as of 15:33, 2 July 2015