$(\'.xx\').mouseenter(function(){
if($(this).is(\':hover\'))
alert(\'d\');
else
alert(\'f\');
});
Here is my code, it should alert \'d
As Frederic said, :hover is part of CSS and is not a selector in jQuery.
For an alternative solution, read How do I check if the mouse is over an element in jQuery?
Set a timeout on the mouseout to fadeout and store the return value to data in the object. Then onmouseover, cancel the timeout if there is a value in the data.
Remove the data on callback of the fadeout.