有人可以帮帮我..
这是我的小提琴......工作正常。
http://jsfiddle.net/supplement/j77eB/
现在,当我将代码发布到我的网站时......
<head>
<script src="http://code.jquery.com/jquery-1.9.1.min.js" type="text/javascript"></script>
<script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.10.0/jquery-ui.js"></script>
<link href="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.10.0/themes/black-tie/jquery-ui.css" rel="stylesheet" type="text/css">
<style type="text/css">
label {
display: inline-block;
width: 5em;
}
.red {
color: red;
}
}
</style></head>
<script>$(function () {
$(document).tooltip({
content: function () {
return $(this).prop('title');
},
show: null,
close: function (event, ui) {
ui.tooltip.hover(
function () {
$(this).stop(true).fadeTo(400, 1);
},
function () {
$(this).fadeOut("400", function () {
$(this).remove();
})
});
}
});
});</script>
<p><a href="#" title="<span class='red'>This is a <a href='#'>link</a></span>">Tooltips</a> can be attached to any element.
When you hover the element with your mouse, the title attribute is displayed in a little box next to the element,
just like a native.</p>
它不起作用......
是我的链接吗?
答案 0 :(得分:0)
<script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.10.0/themes/black-tie/jquery-ui.css"></script>
您正在将CSS文件引用为JS。
推测你的意思是:
<script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.10.0/jquery-ui.js"></script>