VinnyFonseca
11/15/2016 - 11:14 AM

addEventListener multiple events

addEventListener multiple events

["change", "keyup", "paste", "input", "propertychange", "..."].forEach(function(event) {
  document.querySelectorAll('SELECTOR').addEventListener(event, function() {
    // Your callback here
  }, false);
});