> And as can be seen there is a problem when one hovers over the area in > which the delete button is rendered; it starts flickering. Hopefully > anyone has a solution for this problem.
Like Oskar said, you throttle the events down to one in/one out by using mouseenter/mouseleave. But I'm kind of surprised you want it this way with the constant DOM add/remove. Maybe it's just my styling-styley, but I would do this with an element that stays put in the DOM and gets re(CSS)classed to show/hide. Doesn't mean you have to have it in the initial markup, but rather could add it on mouseenter. Removing it seems off to me. I realize this is a common pattern and not just you, but I don't really get it; seems like unnecessary wear-and-tear on the DOM and more likely to lead to redrawing issues, particularly in IE. I guess I apply something like the DRY principle here. I usually write these things into the original markup, too (though as I said, you don't have to) considering progressive enhancement: I like to have a button that serves as a full postback or as an XHR POST depending on whether JS is enabled, so that button can't *depend* on JS for its very existence. FWIW... -- S.
