Why would this work :
$(document).on(\"dblclick\", \"#areaA tr:has(td)\", function(e) { //code here });
and this does not
The main difference is that the condition in the first one will be checked each time you click. So if the element with id areaA or the tr or td inside is added dynamically, only the first one can work.
areaA
tr
td