index.js
function triggerEvent(el, type, options) {
  if (isString(el)) {
    options = type;
    type = el;
    el = document;
  }

  var e = createEvent(type, options);

  el.dispatchEvent
    ? el.dispatchEvent(e)
    : el.fireEvent('on' + type, e);
}
function triggerEvent(el, type, options) {
  if (isString(el)) {
    options = type;
    type = el;
    el = document;
  }

  var e = createEvent(type, options);

  el.dispatchEvent
    ? el.dispatchEvent(e)
    : el.fireEvent('on' + type, e);
}
function triggerEvent ( el , type , options ) { if ( isString ( el ) ) { options = type ; type = el ; el = document ; } var e = createEvent ( type , options ) ; el . dispatchEvent ? el . dispatchEvent ( e ) : el . fireEvent ( 'on' + type , e ) ; }
Trigger an event of `type` on an `el` with `options`.

@param {Element} el
@param {String} type
@param {Object} options
Trigger an event of type on an el with options .