I have this piece of code:
<style>
[contenteditable]:hover, [contenteditable]:focus {
background: #D7D7FF;
}
</style>
To have the background of a cell from a table change colors when hovered or when focused.
Now one of the columns' name is Status. If the Status is late, meaning the value of that cell is = "Late", I would like the background to change to #FFD7D7
. How would I write this in javascript?
Since this <style>
is at the beginning of the html file and not inside a CSS I'm a little lost and don't know how to do this.
Any help is greatly appreciated!