Since jQuery live is marked as deprecated. I thought it’d be a good thing to switch to use jQuery on.
I was at first shocked to find out that “ON” did not work like “LIVE”. Without digging very far, I simply switched my old syntax that had
$('a.delete').live('click', function() {});
to
$('a.delete').on('click', function() {});
It worked for non dynamically generated DOM tree but failed to work on anything that’s dynamically generated. Thank you to stackoverflow, I was able to use the correct syntax for any bubbling event binding to
$(document).on('click', 'a.delete', function(event) {});
Here’s my jsFiddle example to better demonstrate what I’m talking about -> jQuery ON syntax vs. LIVE syntax.