I'm trying to add an event listener to all elements with a class of section, however it only applies it to the last object in the node list.
var section = document.querySelectorAll('.section');
for(var i=0;i<section.length;i++){
var elem = section[i];
elem.addEventListener('click', function () {move (elem)}, false);
}
Is there a way I can add the event listener for each one?