jQuery .live() vs .on() method for adding a click event after loading dynamic html
If you want the click handler to work for an element that gets loaded dynamically, then you set the event handler on a parent object (that does not get loaded dynamically) and give it a selector that matches your dynamic object like this: $(‘#parent’).on(“click”, “#child”, function() {}); The event handler will be attached to the … Read more