Problem
I'm trying to do an effect where a pop-up appears when the user mouses over. The focus is then set on that popup. When the user does a focusout of said pop-up, it disappears.
Example
You can view a working example below, but you'll need to login as "testuser" in both usernames and password fields. Hover the login box once logged in and a pop-up will appear to tell you you're already logged in.
I want that pop-up to fade out once the user removed focus from it, since it contains a logout button.
Currently...
What I have so far:
$('.disabled').hover (
function () { $('#bubble_logged').fadeIn(300); },
function() { $('#bubble_logged').focus(); }
);
$('#bubble_logged').focusout ( function () { $('#bubble_logged').fadeOut(300); } );
Apparently, this is not valid, or there's something I'm not grasping properly. I'm very new to jQuery, so enlightenment would be great!
[EDIT] If you have a better way of doing this, I'm all ears by the way!