Jquery工具提示在关闭元素上滞后/重复

时间:2016-07-14 16:44:48

标签: jquery html

我的工具提示没有正确消失(IE移动到下一个元素后滞后)

的jQuery

$(document).ready(function() {
    loadMap(x, y,z);
    $(document).tooltip({
        at: 'center top',
        my: 'center bottom'
        });
    if(z != 0)
    {
        $('#map').addClass('hell'); 
    }
    upgrade();
});

HTML

    <div class='upgrade' id='technology' title='tech'>tech 16 <br />$101,538</div>
<div class='upgrade' id='economy' title='econ'>econ 14 <br />$19,600</div>
<div class='upgrade' id='medicine' title='medicine'>medicine 14 <br />$13,069</div>
<div class='upgrade' id='biology' title='biology'>biology 9 <br />$6,480</div>
<div class='upgrade' id='offense' title='offense'>offense 5 <br />$1,450,369</div>
<div class='upgrade' id='defense' title='defense'>defense 13 <br />$3,782,340</div>
</div>

当您将鼠标从升级移动到下一个时,前一个鼠标将保留在前一个div上或重叠新的div。

1 个答案:

答案 0 :(得分:1)

请你试试这个,

&#13;
&#13;
        $("document").tooltip({
            position:{
              at: 'center top',
              my: 'center bottom'
            }
        });
&#13;
&#13;
&#13;