I have a function which changes content of the iframe (for instance change the URL of the images). Currently, I bind a function to iFrame's load
. Something like:
$('iframe#frame').load(function() { });
The problem is, when I run this and change the src
attribute of the iframe, the function runs after all the elements are loaded and then changes it. I want to be able to run the code as soon as the HTML content of the iFrame is loaded to prevent the extra loading time. Is there any way I can achieve this?