Flickering issue in chrome when mouseover div
<p>I have written an javascript that generates the dynamic elements based on the jSON data supplied to it.</p>

<pre><code>  $(function () {
        var list = JSON.parse(@ViewBag.NomineeList);
        var counter = 1;
        var tr;
        $(list).each((function () {
            if (counter % 2 != 0) {
                tr = CreateElems('tr', null, null);
            }
            var td = CreateElems('td', null, null);
            var div = CreateElems('div', 'dvBorder', null);
            div.attr('empID', this.EmpId);
            div.attr('nomineeID', this.Id);
            RegisterEvents(div);
            div.append('&lt;img alt="user" src=' + this.UserImagePath + ' style="padding: 5px;" /&gt;');
            div.append(CreateElems('span', 'EmpolyeeName', this.FirstName));
            div.append(CreateElems('span', 'EmployeeEmail', this.Email));
            td.append(div);
            tr.append(td);
            if (counter % 2 == 0) {
                $('#tblEmployee').append(tr);
                tr = "";
            }
            counter++;
        }));
    });

    function CreateElems(type,cssClass,value)
    {
        var elem = $(document.createElement(type));

        if(value != null)
            elem.text(value);

        if(cssClass!= null)
            elem.addClass(cssClass);

        return elem;
    }
</code></pre>

<p>There are three different events that i have registered for the dynamic elements that are created.</p>

<pre><code>   function RegisterEvents(crntDiv) {
        var url;
        $(crntDiv).click(function () {
            url = "/home/SaveVote?nomineeId=" + $(crntDiv).attr('nomineeID');
            AjaxCall(url, false, crntDiv);
        });

        $(crntDiv).mouseover(function () {
            RemoveToolTip();
            url = "/home/GetDescription?nomineeId=" + $(crntDiv).attr('nomineeID');
            AjaxCall(url, true, crntDiv);
        });

        $(crntDiv).mouseout(function () {
            $(crntDiv).children('div.RollOverTip').remove();
        });

    }
</code></pre>

<p>when you mouse over the tool tip comes up . On that event I am checking if any previous tool tip is present in dom it should be removed.</p>

<pre><code>  function RemoveToolTip() {
            $('#tblEmployee').find('div.RollOverTip').remove();
        }
</code></pre>

<p>But still there are times when there are more than two three tool tips are present on the browser. Also can this be optimized a bit.</p>

<p>Html</p>

<pre><code>&lt;table border="0" cellpadding="5" cellspacing="0"  id="tblEmployee"&gt;
        &lt;/table&gt;
</code></pre>

<p>css Classes.</p>

<pre><code>.dvBorder
{
    background-image: url(/Images/screen2-button.png);
    background-repeat: no-repeat;
    height: 125px;
    width: 400px;
    cursor:pointer;
    position: relative;
}


.RollOverTip
{
    background-image: url("/Images/screen2-rollover-tooltip.png");
    background-repeat: no-repeat;
    color: #000000;
    font-family: Calibri Regular;
    font-size: 18pt;
    height: 199px;
    line-height: 20pt;
    margin-left: 385px;
    position: absolute;
    width: 474px;
    z-index: 90000;
    padding:34px;
}
</code></pre>

<p>What are the optimization possible in the script,also any suggestions to remove the flickering?</p>
