I have an iframe/img. I want to trigger the "load" event when the content is completely binded. In the fiddle, it should get a alert message.
So here my requirement is to trigger the event when the content is fully loaded to the iframe/img. Ie if that is an image, if I am not handling this, the user can see the pixel by pixel binding to the img tag.
$(document).ready(function(){
$('#test').attr('src', 'http://www.youtube.com/v/h60r2HPsiuM');
$('#test').load(function(){
alert('loaded');
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<iframe class="content_tag" id="test" frameborder="0"></iframe>