How to add a click event to elements in iframe (using jQuery)
Your best best bet is to invoke the iframe AS LONG AS it's part of your domain.
iframe.html
And then use
document.getElementById('targetFrame').contentWindow.MyMethod();
To invoke that function.
another way is to access the iframe via window.frames.
and the javascript
child_frame = window.frames['myIframe'].document;
$('p',child_frame).click(function(){
alert('This click as bound via the parent frame')
});
That should work fine.