Check hover state with jQuery
<p>Is there anyway to check for a hover state? I have a multipurpose link that switches purposes on click (basically active / inactive). I want to add a transition effect but in order for it to look perfect I'd like to do a <em>possible</em> mouse out effect if the cursor is still hovering over the link, otherwise I'd like for it to go ahead with the effect. Basically this is what I'm looking to do:</p>

<pre><code>$(link).click(function(){
  $(this).animate({whatever}, 500, function(){
    if ($(this).is(':hover')) {
      $(this).one('mouseleave', function(){
        $(this).animate({whatever}, 500);
      });
    } else {
      $(this).animate({whatever}, 500);
    }
  });
});
</code></pre>

<p>The ':hover' state doesn't exist.. so is there something that I can do?</p>
