I\'m finding it increasingly difficult to simulate actual user events using jQuery or native element trigger functions. For example, if you have a text input and you don\'t
Simulate real event is quite complicated. You must first determine which type of event you need and create it with document.createEvent. Then call different init*Event to initialize the event object. Finally, use element.dispatchEvent to dispatch the event to the target object.