Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help with featured image / thumbnail switch #4

Open
rickydazla opened this issue Jun 6, 2012 · 1 comment
Open

Help with featured image / thumbnail switch #4

rickydazla opened this issue Jun 6, 2012 · 1 comment

Comments

@rickydazla
Copy link

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?

@LeMisterV
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants