1
的jQuery:jQuery的工具提示问题 - jQuery的
$(function() {
$("img").tooltip();
$("a").tooltip();
})
HTML:
<div id="container">
<div id="main">
<a href="#">testing</a>
<img src="trollface.jpg" title="Hello, imma trollface!" />
</div>
</div>
在上述情况下,tooltip只<img>
标签的作品。
我还没有在<img>
或<a>
上添加任何CSS。
$("a").hover(
function() {
$(this).animate({color: "white"}, 400);
}, function() {
$(this).animate({color: "black"}, 400);
})
但是,上述现在不起作用。
仍然不起作用。我想在该工具提示中加载html内容。 –
如果你想使用HTML工具提示,你必须用一个“toolip”类来构建div,而这在你的示例代码中似乎没有。查看http://jsfiddle.net/s7Fte/上的示例。 –
我拥有它,我只是没有指定它。顺便说一下,我在谷歌浏览器中试过,它工作。我使用Firefox 5. –