开发者

jQuery Hover Problem - Hover Triggers on Mouse Move

开发者 https://www.devze.com 2022-12-12 07:39 出处:网络
For reference: http://www.favsav.com/-public You\'ll notice that if you hover over a list item, the meta data slides up. If you leave your mouse still on top, and then move a smidgen to the left or r

For reference: http://www.favsav.com/-public

You'll notice that if you hover over a list item, the meta data slides up. If you leave your mouse still on top, and then move a smidgen to the left or right, it triggers again. There's some other silliness going on if you move around

The code is pretty simple:

    $('li.post').hover(function(){
        $(this).find('.meta').slideDown('fast');
    }, function(){
        $(this).find('.meta').slideUp('fast');
    })

Any idea why things 开发者_运维技巧are behaving like this?

This seems to only be happening in Firefox (i'm using 3.5.5 on OSX)

UPDATE After restarting Firefox, all is well! Thanks for the input!


Unfortunately, I'm not able to reproduce this behavior in Google Chrome 3.0.195.33. To me, it seems that this might just be an issue with the rendering/javascript handling in your browser. What browser are you using? The code looks OK.

UPDATE: Seeing as how the problem was resolved with a reboot of Firefox, and that it was un-reproducible, it seems that your code is A-OK. Good luck!


If this does happen to you, try setting a height & width on the element you're hovering over.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号