In my page, there is a iframe loads, I just want to find the element after it loads, so that I used this function:
$("body").on("DOMNodeInserted", ".ssueContentIframe", function() {
$(this).css('border', '1px solid red'); //works
update();
});
After the Iframe
loaded, I would like to add a event Listener to one of my element, so I would like to listen as well for that I am calling a function as update
like above, but I am not getting the result.
What is the correct way to use the DOMNodeInserted
for Iframe contents?
here is my try on update
function:
var update = function(){
$(".ssueContentIframe").contents().on("DOMNodeInserted", '.ui-grid-selection-row-header-buttons', function(){
//above contents load in for loop, after loop nothing added
$(this).css('border', '1px solid red');//not works
});
};
or what is the correct way, is there any plugin otherwise? Require you kind help here!