jquery strange flickering on mouseover/out

Posted by Jonah on Stack Overflow See other posts from Stack Overflow or by Jonah
Published on 2010-04-09T00:11:13Z Indexed on 2010/04/09 0:13 UTC
Read the original article Hit count: 823

Filed under:
|

The HTML:

<div id="timerList">
...
    <li rel="project" class="open">
        <a class="" style="" href=""><ins>&nbsp;</ins>Project C</a>
    </li>
...
</div>

The javascript/jquery:

$('#timerList li[rel="project"]').mouseover(function(){
    $('a:first',this).after('<span class="addNew"><a href="#">Add Timer</a></span>');
}).mouseout(function(){
    $('.addNew',this).remove();
});

When I hover my mouse over an li element, a span.addNew element is created within

THE PROBLEM: When I put my mouse ofer the span.addNew, it flickers on and off. Perhaps the mouseout event is firing, but I don't understand why it would or how to prevent it.

Thanks!

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about JavaScript