Created
April 27, 2017 20:24
-
-
Save asterion/0411bd597b79ce53750dfd4c70d872e9 to your computer and use it in GitHub Desktop.
javascript + css + json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var colors = {x: y}; | |
for (h=0;h<24;h++){ | |
i=h*2; | |
val1 = eval("json."+(root+i));//concat strings and values to access h vars | |
val2 = eval("json."+(root+(i+1))); | |
if (val1 != null && val2 != null){ | |
table.append("<tr style=\"background-color:"+ colors[x] +"\"><td>"+formattedH(h)+":00 </td> <td id="+i+">"+val1+"</td><td id="+(i+1)+">"+val2+"</td></tr>"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment