As the title states, I have a script that has just suddenly stopped working properly.
The script essentially replaces a jpg with an animated gif once hovered over said jpg.
Until today everything was working fine, but now the the animated gif doesn't play anymore for some unknown reason. With Firebug open, I can see that the script is still doing its job (jpg gets swapped for gif).
This problem is not occurring in Safari, but is occurring in Chrome and Firefox.
I'm guessing the problem is more to-do with the browsers and the gif rather than the script?
Here's the script:
$(".image").hover(function(){
$(this).attr("src", function(index, attr){
return attr.replace(".jpg", ".gif");
});
}, function(){
$(this).attr("src", function(index, attr){
return attr.replace(".gif", ".jpg");
});
});