code: function addEventListener(el, eventName, handler) {
      removeEventListener(el, eventName, handler);
  
      if (window.jQuery) {
        $(el).on(eventName, handler);
      } else if (el.addEventListener) {
        el.addEventListener(eventName, handler);
      } else {
        el.attachEvent('on' + eventName, function () {
          handler.call(el);
        });
      }
    }
docs: Add listener to an element (IE8 compatible)