The first method you describe works because you select a static parent, and then a dynamic child that follows the rules for binding events to dynamically created elements using the .on method.
Here is the syntax of the .on method, which sounds like you have done a bit of work.
$(selector).on(event,childSelector,data,function,map)
So, if I want to bind to a dynamic element using .on , I must mean the dollar sign, first select the static parent element, and inside the .on method select the dynamic child element. In your case, the correct usage example will work as follows:
$("body").on('dblclick', '#areaA tr:has(td)', function(e) {
Since you mentioned that it does not work, I assume that #areaA not a static element. You can replace the body with a more important static element or just leave its body, it does not matter much.
kiko carisse Jul 31 '17 at 13:39 2017-07-31 13:39
source share