jquery.hoverintent icon indicating copy to clipboard operation
jquery.hoverintent copied to clipboard

Help with featured image / thumbnail switch

Open rickydazla opened this issue 12 years ago • 1 comments

Hey there, I have the following I wrote to switch a featured product image on mouseover:

    $('.thumbnail').live('click mouseenterintent', function () {
      $('.featured img').prop('src',$(this).prop('src').replace('small','big'));
      return false;
    });

mouseenterintent does not seem to work here like mouseover does... what am I doing wrong?

rickydazla avatar Jun 06 '12 07:06 rickydazla

Hi,

I can't look at this right now, but I think it's not possible to use events "mouseenterintent" or "mouseleaveintent" with .live(). Thoses events are not natural DOM events, but special events. I think thoses special events won't bubble like natural DOM events do. So it's not possible to delegate ( .live() ) thoses special events (same problem as focus or blur events).

I'll look at this deeper as soon as I can, and I hope I'll be able to make a new version of jQuery.hoverIntent with bubling events soon (or compatible with event delegation).

Thanks for your feedback, and sorry for this issue.

Nico

LeMisterV avatar Jun 06 '12 11:06 LeMisterV