The site I\'m working on has a Live Chat plugin on an iframe. I\'m trying to change an image if there are no agents available. My code works on the console, but nothing on t
Another way to bind to the load event of an iframe is to attach a load listener to the iframe before adding a src tag to the iframe.
Here's a simple example. This will also work with iframes that you don't control.
http://jsfiddle.net/V42ts/
// First add the listener.
$("#frame").load(function(){
alert("loaded!");
});
// Then add the src
$("#frame").attr({
src:"https://apple.com"
})