I have an IFRAME and I want to trigger an event (which is inside the iframe) from the parent of an IFRAME:
Just a rough example of what I am trying to do :
<iframe id="i">
<div id="test"></div>
<script>
$(document).ready(function() { // Event is binded inside the iframe
$("#test").live({ click : function() { alert("hello"); } });
});
</script>
</iframe>
<script>
$(document).ready(function() { // Want to trigger it from outside the iframe
$("#i").contents().find("#test").trigger("click");
});
</script>