Monday, 12 August 2013

Maintain divs visibility when hovering if div is not a child element of triggering element

Maintain divs visibility when hovering if div is not a child element of
triggering element

I have a simple hover over script:
$('#loginbutton').hover(
function () {
$('#loginform').stop().fadeIn('fast');
},
function () {
$('#loginform').stop().fadeOut('fast');
}
);
Unfortunately, #loginform is not a child of #loginbutton, though both divs
overlap.
Is there a way I can maintain #loginforms visibility if the mouse leaves
#loginbutton and moves over #loginform?

No comments:

Post a Comment