Prior to this,the recommended approach was to use live :$(selector).live( eventName, function(){} );
However, live() was deprecated in 1.7 in favour of on(), and completely removed in 1.9. The live() signature:
... can be replaced with the following on() signature:
For example, if our page was dynamically creating elements with the class name dosomethingwe would bind the event to a parent which already exists, often document.
Any parent that exists at the time the event is bound is fine. For example
Related Searches to javascript tutorial - Event binding on dynamically
click event for dynamically created button jqueryhow to bind click event in jquery for dynamically added html elementevent binding on dynamically created elements javascriptjquery add onclick event dynamicallyjavascript add event listener to dynamically created elementclick event doesn't work on dynamically generated elementsjquery on not working for dynamic contenthow to add onclick event in javascript dynamicallyclick event for dynamically created button jqueryjquery add onclick event dynamicallyevent binding on dynamically created elements javascriptclick event doesn't work on dynamically generated elementsjquery on not working for dynamic contentjavascript add event listener to dynamically created elementjquery select dynamically added elementjquery dynamic id click eventjavascript tutorialjava scriptjavascriptjavascript arrayjavascript booklearn javascriptjavascript codejavascript editorjavascript classjavascripjavascript debuggerjavascript onlinejavascript examplesjavascript testjavascript documentjavascript sliderwhat is javascriptjavascript form validationjavascript validatorhtml javascriptjavascript alertjavascript eventsjavascript printjavascript domjavascript objectjavascript functionhref javascriptjavascript datejavascript promptjavascript onclickjavascript returnjavascript forjavascript numberjavascript confirmjavascript onchangejavascript regular expressionjavascript ifjavascript variablejavascript timerjavascript cookiejavascript getelementbyidjavascript innerhtmljavascript calljavascript regexpjavascript includesjavascript thisjavascript eval