I want to change the color of an element onClick - however I already have an onCLick function attached to the HTML element already. here is my code
function changeColor(cell){
for (var i=0;i<cell.length;i++){
cell[i].classList.remove("active")}
elem.classList.add("active");
}
}
table>
<tr>
<td><input type="button"class= "input" id="cell1" onclick="clickThis(this.id)"></input></td>
<td><input type="button"class= "input" id="cell2" onclick="clickThis(this.id)"></input></td>
<td><input type="button"class= "input" id="cell3" onclick="clickThis(this.id)"></input></td>
</tr>
<tr>