I'm trying to swap two images with jQuery. Using the hover event I tried:
$("#wlt-DealView .buyButton_new").mouseover(function(e){
$('.buyButton_new').css('background-image','url(../images/compra_mouseOver.png)');
});
$("#wlt-DealView .buyButton_new").mouseout(function(e){
$('.buyButton_new').css('background-image','url(../images/compra_normal.png)');
});
But the image is not showing and after I get the mouse from it, it triggers the second event. It should update with the first image, but it doesn't.
You can have a look here: http://107.20.186.103/deals/cuerpon
.
Hover the BUY button.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…