First of all, I apologize if this issue seems really bazaar. Here is the problem. I have a page that contains both static and dynamic content. In the static part, I have attached a link that looks like this:
It works perfectly. The link is clicked and a modal (dialog box) is shown from the Drupal kernel (powered by jQuery UI).
But nevertheless; In another part of the page, I have inserted content in the DOM with a code that looks like this:
$ (".insert") .load (data + ".rlp-detail-more", loadComplete) .attr ("data-research-content", dataResearch);
That code contains EXACTLY the same html string as the previous one …
However, clicking on the link takes me to the content without overlapping / modal / dialog.
And it gets weirder …
If I leave the inserted content open and click on the link below in the static content, suddenly both work … for example, the jquery event manager was somehow attached to the inserted content.
My question is … How can I force an attachment of the event handler?
This question requires a good understanding of the jQuery dialog event and the Drupal 8 integration of jQuery UI