Team:Tec-Monterrey/ITESM14 notebook.html

From 2014.igem.org

Revision as of 12:01, 12 October 2014 by Ejzardainc (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Calendar

     <script type="text/javascript">
       var cal = new CalHeatMap();
       cal.init({
         domain: "month",
         subDomain: "x_day",
         data: "notebook/notebook_data.json",
         start: new Date(2014, 6),
         cellSize: 20,
         cellPadding: 5,
         domainGutter: 20,
         range: 4,
         legend: [2, 4, 6, 8],
         legendColors: ["#FFE6FF", "#FF0060"],
         onClick: function(date, count) {
           //alert("Oh gosh, " + count + " things occured on " + date.toISOString());
           //var path = "notebook/" + date.toISOString() + ".html";
           //var path = "module1.html"
           //$("#myid").load(path);
           var month = date.getMonth() + 1;
           var day = date.getDate();
           var pid = "date-" + month + "-" + day;
           $("#myid").load("notebook/notebook_data.html #" + pid);
         }
       });
     </script>