var whichSelected = document.querySelectorAll(".selected");
for(var i = 0; i < whichSelected.length; i++) {
var clone = whichSelected[i].cloneNode(false);
clone.addEventListener("click", function() {createOutline(clone)});
document.body.appendChild(clone);
}
I have no idea why the event listener will not work on the clones. Any ideas is appreciated!