Binding Live Events in jQuery

Dynamically created DOM elements in Javascript are do not by default have event listeners bound to them. In order to have this automatically happen use the “live” method in jQuery. This method monitors the changes to the DOM and updates the listener. It is much more efficient code than binding listeners after element creation. Below is a quick example of a live click binding:

$(".class").live('click', function(event){

Related Post