I've been messing around with java script the past couple of days and have been trying to write an if statement for a match report system I am creating.
if (document.getElementById('team1_score') > document.getElementById('team2_score') ){
document.getElementById('team1_score').style.color == 'rgb(101, 189, 119)';
}
https://jsfiddle.net/ya6d2qbz/5/
What I am trying to is that if the score of the team1 is greater than team2, the color of team1's text will turn black instead of the normal gray.
However I haven't been successful. Can anyone help me out?