jQuery工具提示否定位置 [英] jquery tooltip negative position

查看:62
本文介绍了jQuery工具提示否定位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用jquery工具提示,但是将div悬停在负坐标处(-27000,-27000)

I'm trying to use a jquery tooltips, but the hovering div is placed at negative coordinates(-27000,-27000)

应该具有工具提示的元素是这样:

The element which should have the tooltip is this:

<span style="float:right;font-weight:bold" title="I am tooltip">U</span>

我通过以下调用初始化工具提示: $(function(){ $('[title]').tooltip(); });

I initialize the tooltip with this call: $(function(){ $('[title]').tooltip(); });

jQuery工具提示已正确初始化,因为在鼠标悬停时,我得到了一个新的div,但放置在巨大的负坐标上:

The jQuery tooltip is properly initialized, because on mouseover, I get a new div, but placed at huge negative coordinates:

<div id="ui-tooltip-4" class="ui-tooltip ui-widget ui-corner-all ui-widget-content" 
role="tooltip" style="top: -27712.3px; left: -27517.2px; display: block;">
    <div class="ui-tooltip-content">I am tooltip</div>
</div>

放置不良的原因是什么? 这些是应用于标题的样式:

What can be the cause of bad placement? These are the styles being applied on the span with the title:

float: right;
font-weight: bold;    
-moz-box-sizing: border-box;    
-moz-box-sizing: border-box;
border-collapse: collapse;
font-size: 0.85em;
line-height: 1.3;
list-style: none outside none;
color: #222222;

使用的库:

jquery-1.8.3.min.js
jquery-ui-1.10.10.min.js(and jquery-ui-1.10.10.css)

感谢任何提示导致工具提示定位错误的原因

Thanks for any ideas what's causing the bad positioning of tooltip

推荐答案

问题正在导入 qtip 库和jquery-ui.删除该库后,一切都很好.

The problem was importing qtip library together with jquery-ui. After removing this library, everything is fine.

这篇关于jQuery工具提示否定位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆