delegate in javascript
Definition and Usage
The delegate() method was deprecated in version 3.0. Use the on() method instead.
The delegate() method attaches one or more event handlers for specified elements that are children of selected elements, and specifies a function to run when the events occur.
Event handlers attached using the delegate() method will work for both current and FUTURE elements (like a new element created by a script).
Syntax
$(selector).delegate(childSelector,event,data,function)