Seeking assistance in adding an Event Handler for each of my <td>
elements. I attempted the code below:
var allSquares = document.getElementsByTagName("td");
for (var i = 0, len = allSquares.length; i < len; i++){
allSquares[i].addEventListener('ondragover', allowDrop, false);
}
Curious as to why this approach did not yield the desired result. Any insights are greatly appreciated.