Closed (outdated)
Project:
jQuery Update
Version:
6.x-2.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
1 Mar 2010 at 02:36 UTC
Updated:
8 Mar 2017 at 15:36 UTC
Jump to comment: Most recent
Comments
Comment #1
sam3k commentedOk, so after playing around I found it possible to use mouseenter and mouseleave using jquery bind()
$('#myDiv').bind('mouseenter', function() {
$(this).animate({
left: '10'
}, 100, function() {
sidetabAnimating = false;
});
});
$('#myDiv').bind('mouseleave', function() {
$(this).animate({
left: '0'
}, 100, function() {
sidetabAnimating = false;
});
});
Still, if someone could shed some light into why I can't just use them as methods it would greatly help for future reference.
Comment #2
Mumonkan commentedi am getting weird stuff around mouseenter and mouseleave and jquery with drupal too! i am so glad you posted this cuz i thought i was going crazy.
fwiw, i cannot even get the bind() option to work. *however* at least the bind way does NOT halt my javascript, which is what was happening when i was doing $(#foo).mouseenter(). code beyond that point was simply not working. sigh.
i am not sure why this doesnt work, as the jquery docs said this was added in v1.0. and i have tried moving things inside .ready() as well. nothing works. it just silently fails. and yet it works for me on the jquery example page. i am stumped.
Comment #3
_rune commentedI believe "mouseenter is not a function" would occur when trying to run ".mouseenter()" on a non-existing element, i.e. an empty selection like $('#dont-exist').mouseenter(...".
Cheers
Rune
Comment #4
yongke commentedHi, I used your workaround and got it to work in Drupal 6. Thanks!
Comment #5
nzcodarnoc commentedUsing the bind technique in #1 worked for me.
Comment #6
aulnes-69-omettre@icloud.com commentedWorks perfectly. Thanks !
Comment #7
codeglyph commentedsame problem here.
#1 works. thnx
Comment #8
jordotech commentedThis came in really handy for me too, had the same problem. Thanks!
Comment #9
sumaiyajaved commentedI am using drupal 6 without jquery update and had the same issue.
Thanks sam3k, using bind() solved it. I was thinking it could be because of jquery version, but just guessing here.
Comment #10
markhalliwellDrupal 6 reached EOL (end-of-life) on February 24, 2016.