Running this method:
$(".group-details-popup", grid.tbody).on("click", function (e) {
which is equivalent to:
$(grid.tbody).find(".group-details-popup").on("click", function (e) {
Attaches a click event handler to an existing "group-details-popup" class inside a link to a jQuery grip.tbody element.
To connect to an element that does not yet exist, you will need to bind the event handler to some shell for that element - what holds the element after it is added. One option is a βdocument,β however a document is not a desirable container if you can get something more precise so that the event handler does not have to process the entire DOM to find the target. You seem to have a wrapper around the elements, so use this.
$(grid.tbody).on("click", ".group-details-popup", function (e) {
source share