$('.icon1').mouseover(function(){
$(this).find('img').attr('src', 'recursos/botban/maq1.png');
});
Should work right? It's just an arbitrary test to see what was wrong, but it's still broken.
I've also tried with $('.icon1').hover(function(){...
, and it also does not work.
What I really want is more like...
$('.icon1').mouseover(function(){
var alt = $(this).find('img').attr('src')+'.png';
$(this).find('img').attr('src', $(this).attr('id')+''.png);
}).mouseout(function(){
$(this).find('img').attr('src', alt);
});
The HTML for each image is as follows...
<a class='icon1'><img src='recursos/botban/veh1.png'></a>