I'm trying to set up an event on the parent that gets triggered when an iframe loads a new page (likely via the user clicking a link).
HTML:
<iframe name="posts" id="posts" src="edit.php">
JS:
$(document).ready(function() {
$('iframe#posts').live('load', function() {
console.log('live');
});
});
The problem is that the console.log()
statement never gets triggered. How can I achieve what I'm trying to do?