Execute all handlers and behaviors attached to the matched elements for the given event type.
$('button').on('click', () => console.log('Clicked'));
$('button').trigger('click');
// Console Output:
"Clicked"
$('button').on('click', e => console.log(e.detail._sr_extra));
$('button').trigger('click', { foo: 'bar' });
// Console Output:
{ foo: "bar" }
| Parameter | Type | Description |
|---|---|---|
| eventType | string | One or more space-separated event types to trigger. |
| extraParameters | any | Additional parameters to pass along to the event handler. Accessible via event.detail._sr_extra. |
Returns: The original SR object for chaining.