I\'am trying to detect if the source of a image is changed.
In my case the src is changed from jquery, and i have no right\'s to change the jquery file. So im trying
I think there is no event for that, you can create your own 'event':
var divimg = document.getElementById("img_div"), prevSrc; setInterval(function() { if (divimg.src != prevSrc) { prevSrc = divimg.src; onSrcChange(); } }, 1000); // 1000ms = 1s function onSrcChange() { // do something }