Thanks for you post Kieran!
Unfortunately I already applied the jQuery method to my image element and it doesn't appear to fire up once I change my source.
I have tried the .load(fn) as an jQuery alternative, but as I said it has to finish loading before the handle is executed. But when all else fails I'll probably use the method.
I don't think IE supports watch()???
I like that jQuery Visual reference, it's simple, did you make it?
Another problem I'm having is when I run:
Code: Select all
$(this).load(function() {
this.src = "somethingelse.gif"
});
I get a stack overflow error in IE when the image fires this event. I think it's be cause once the handle is executed, the src of the img is changed and the event executes once more. Then this repeats itself resulting in a never ending loop which IE detects and throws an error which IE calls "Stack overflow", I think.
So my question is how could I only change the src of the image if the src equals other then "somethingelse.gif"?
I try:
Code: Select all
$(this).load(function() {
if (this.src != "somethingelse.gif")
{
this.src = "somethingelse.gif"
}
});
and the results are the same...
What's going on here?