-1

Have found a JS code that show a icon from font-awesome, but its white and i'm trying to add a color to it, but can't find the right class to add it on in CSS file.

The JS codeblock is:

      // Transportation icon
  var cellTransport = document.createElement("td");
  cellTransport.className = "timeinfo";
  var symbolTransportation = document.createElement("span");
  symbolTransportation.className = this.config.iconTable[currentDeparture.transportation];
  cellTransport.appendChild(symbolTransportation);

How can I add a color to "symbolTranspotation" ?

Thomas BP
  • 1,187
  • 3
  • 26
  • 62

2 Answers2

0

Try to add it to style

symbolTransportation.style.color = "lightblue"
AlexOwl
  • 869
  • 5
  • 11
0

You can use the property style to add color.

symbolTransportation.style.color = 'red';
R3tep
  • 12,512
  • 10
  • 48
  • 75