It seems like the mouse events are bound to the LI element, but not its children. Perhaps restructuring your code like this could help:
<DIV align="center">
<ul id="sdt_menu" class="sdt_menu">
<DIV class="someclass">
<LI>
...and then bind the mouse events to ("#someclass") instead of "#sdt_menu > li"?
When you bind the mouse event to the LI, it doesn't attach to the child DIV, although it does attach to the child A elements.
Another suggestion is to utilize .hover
rather than .mouseenter
and .mouseleave
.
The .hover()
jQuery function has two arguments: the function for when hovering (mouseenter) and when moving away (mouseleave). It's recommended to use that instead of just mouseleave
.