Apologies if this is read by a common moderator between here and jQuery-UI, I was in the wrong tab, haha.
Anyway, I'm having a little trouble coming up with a concise way to do this. I've created a div containing a registration form that fades in when the user hovers over a triggering link, and the code I'm currently using is as follows: $(document).ready(function() { var hide = false; $(".reg1, .register").hover(function(){ if (hide) clearTimeout(hide); $(".login, .about").fadeOut(40); $(".register").fadeIn(); }, function() { hide = setTimeout(function() {$(".register").fadeOut();}, 400); }); }); At the moment I've been able to prevent the ".register" class from fading while the mouse is over it by adding also as the trigger for the initial fade, but what I'd like is for the class to remain visible if a form input has focus for obvious accessibility reasons. Any ideas?