I use the next, in order to change the picture, when I hover the image:
<img id="image1" src="imimage.jpg" alt="facebook.com">
$('#image1').hover(function() {
$('#image1').attr('src', 'imanewimage.jpg');
}, function() {
$('#image1').attr('src', 'imimage.jpg');
});
But something really weird happens: When I load the HTML, the imimage.jpg loaded. But when I hover it, the imimage.jpg doesn't load and only the alt attribute is shown.
What can be the reason?