I have a div element which contains a small form and a dhtmlx datagrid. This div is rarely used so I make use of jQuery's slideUp to hide it out of the way when it isn't needed. I've attached mouseenter and mouseleave events on the div to set up and cancel the slideUp - so that when the mouse is over the div it doesn't disappear.
However, my problem comes in when the user clicks into either one of the form elements or the datagrid and then moves the mouse away. Obviously the user still requires the div to be visible, but the mouseleave event then causes the div to slideUp!
Is there anyway in jQuery of testing whether any element within a div has focus? Then if something does have focus I can cancel the slideUp call.