.delegate(selector, events ,data ,$)
Description: Attach the jQuery chain behind to one or more events for elements that match the selector, now or in the future, based on a specific set of root elements.
- selector –
- A selector to filter the elements that trigger the event.
- events –
- A string containing one or more event types, such as "click" or "keydown," or custom event names.
- data –
- A map of data that will be passed to the event handler.
- $ – the
- Use $ instead of a handler or leave it out.