I am working with a system that I have little control over. I would like to add some third-party javascript/jQuery (there is a mechanism to do this) to alter some hyperlinks within an iFrame.
The problem is, that the iFrame itself is brought in via AJAX. When I try to interact with it, jQuery cannot find it in the document. Here is some code I have attempted to use with no success:
$(document).on('click', '#cust_iframe_2', function(){
alert('found');
});
The element is definitely there when I inspect the source. What am I missing?