function trigger(element, type) {
	  if (!element || !type) {
	    return;
	  } // Create and dispatch the event


	  var event = new Event(type); // Dispatch the event

	  element.dispatchEvent(event);
	}
function trigger(element, type) {
	  if (!element || !type) {
	    return;
	  } 


	  var event = new Event(type); 

	  element.dispatchEvent(event);
	}
function trigger ( element , type ) { if ( ! element || ! type ) { return ; } // Create and dispatch the event var event = new Event ( type ) ; // Dispatch the event element . dispatchEvent ( event ) ; }
Trigger event
Trigger event