Gives focus to the list

jQuery("dl",list).focus(); 

Everything seems to be a good event .on("focus") works, but the focus loss event does not work.

 jQuery("dl", list).on("focusout",hideDropDown); 

Focus is added when you open a custom select , IE7 - IE8

Tell me, please, the reason.

  • And how can DL get the focus? He is not an active element. Depending on what you need, look in the direction of click, mouseenter, keydown, and so on. - sorx00

1 answer 1

For ul, div use mouseenter and mouseleave

If you need to focus on block elements (div, p, li ...), you can use the keydown to track down the TAB or SHIFT + TAB key and further add the "focus" class to the right elements.