What would be the best way to add the active class to an "active/current" element with PLAIN JavaScript?
With jQuery you would use the typical:
$(selector).on('click', function(){
$(selector).removeClass('active');
$(this).addClass('active');
});
But with JavaScript (not vanilla JS, jQuery, etc)??
Heres my fiddle: http://jsfiddle.net/meEf4/2065/