function getValueCss(val) {
if (val <= 231)
return 'high'
else if (234 <= val && val <= 360)
return 'middle'
else
return 'low'
}
How can I get it to where if I put any number the code should generate the table and set the class of each cell to indicate the relative size of the value. So about a third of the table should have 3 colors. Below is the code that worked for 10 and 25. About a third of the table should be each colour. I created the table already I just can't figure out how to get the colors on the table. The code below only shows the color green because my class high in style.css is set to green.
function getValueCss(val) {
if (val <= 231)
return 'high'
else if (234 <= val && val <= 360)
return 'middle'
else
return 'low'
}

New Topic/Question
Reply


MultiQuote




|