In a library I am using I have the task of moving an element to the front of the dom when it is hovered over. (I make it bigger so I need to see it, then shrink it back when
That's wonky, and seems to be IE-only (but so is VML). If the parent element has a height specified, you can attach the mouseout handler to the parent... but it sounds like that won't work in your situation. Your best alternative is to use mouseover on adjacent elements to hide it:
$(function()
{
$("li").mouseover(function()
{
$("li").css("border-color", "black");
$(this).css("border-color", "red");
this.parentNode.appendChild(this);
});
});
Or SVG. You can use z-index in SVG.