function triggerEvent(el, ev, data) {
    var event;

    data = data || {};

    if (window.CustomEvent) {
      event = new CustomEvent(ev, { detail: data });
    } else {
      event = document.createEvent('CustomEvent');
      event.initCustomEvent(ev, true, true, data);
    }

    el.dispatchEvent(event);
  }
/**
   * Convenience function to replicate jQuery's $.trigger() method.
   *
   * @param object el The element on which to trigger the event.
   * @param string ev The event to trigger.
   * @param object data Additional data to pass to the event.
   */
Convenience function to replicate jQuery's $.trigger() method.
@param object el The element on which to trigger the event.
@param string ev The event to trigger.
@param object data Additional data to pass to the event.
Convenience function to replicate jQuery ' s $ . trigger () method . @param object el The element on which to trigger the event . @param string ev The event to trigger . @param object data Additional data to pass to the event .
function triggerEvent(el, ev, data) {
    var event;
    data = data || {};
    if (window.CustomEvent) {
      event = new CustomEvent(ev, { detail: data });
    } else {
      event = document.createEvent('CustomEvent');
      event.initCustomEvent(ev, true, true, data);
    }
    el.dispatchEvent(event);
  }
function triggerEvent ( el , ev , data ) { var event ; data = data || { } ; if ( window . CustomEvent ) { event = new CustomEvent ( ev , { detail : data } ) ; } else { event = document . createEvent ( 'CustomEvent' ) ; event . initCustomEvent ( ev , true , true , data ) ; } el . dispatchEvent ( event ) ; }
Convenience function to replicate jQuery's $.trigger() method.
Convenience function to replicate jQuery ' s $ . trigger () method .