Change the fill color of the passed in element - Node.js CSS

Node.js examples for CSS:Color

Description

Change the fill color of the passed in element

Demo Code


/**//from  w w  w  . ja va  2 s  . c o  m
 * Change the fill color of the passed in element
 * @param id
 * @param color
 */
function styleFill(id, color) {
  document.getElementById(id).style.fill=color;
}

Related Tutorials