jquery hover propagation
Posted
by
Chris
on Stack Overflow
See other posts from Stack Overflow
or by Chris
Published on 2012-06-19T15:08:45Z
Indexed on
2012/06/19
15:16 UTC
Read the original article
Hit count: 284
I'm using this on an hover image :
$('.img-style').hover (function(e) {
var prixPlus = $(this).closest('a').attr('data-prix');
prixPlus = parseFloat(prixPlus);
var prixNew = prix + prixPlus;
$('#chgePrix').html(prixNew.toFixed(2));
$('#txtapart').fadeTo('fast', 0.1);
}, function(e) {
$('#chgePrix').html(prix.toFixed(2));
$('#txtapart').fadeTo('fast', 1);
});
But if I pass quickly the mouse 2 or more times over the image, $('#txtapart') fade in and out 2 or more times ! How can I stop the fade propagation ?
Thanks for your help...
© Stack Overflow or respective owner