Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
$('button').one('click', function() {
console.log('Prize claimed!');
});
// 1st Click: Logs "Prize claimed!"
// 2nd Click: Nothing happens (listener removed).
| Parameter | Type | Description |
|---|---|---|
| eventType | string | One or more space-separated event types (e.g., 'click'). |
| selector | string | Optional. A selector string for delegated events. |
| handler | function | A function to execute when the event is triggered. |
Returns: The original SR object for chaining.