61,112
社区成员
发帖
与我相关
我的任务
分享
<script type="text/javascript" src="js/jquery.qtip-1.0.0-rc3.min.js"></script>
$(document).ready(function()
{
$('#scores img[title]').qtip({
content:{
text: false
},
style: 'cream'
});
});
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<style type="text/css">
*{font-family:verdana; font-size:12px;}
.div01{border:1px solid red; padding:5px; background-color:#EEEEEE; font-family:verdana,arial; font-size:12px; display:none;}
</style>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" language="javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
$('#alink01').mouseover(function(){
var o=$("#msgTip");
var posx = $(this).offset().left+10;
var posy = $(this).offset().top+$(this).height();
var txt = $(this).attr("title");
o.html(txt); //设置显示的信息文本
o.css("left",posx);
o.css("top",posy);
o.css("position","absolute");
o.width(300);
o.show('fast');
});
$('#msgTip').mouseout(function(){$(this).hide('normal');});
});
</script>
<body>
<p>
把鼠标移到这个连接上面看看效果: <a id="alink01" title="这里是 http:www.163.com" href="http://www.163.com">link 163.com</a>
</p>
<div id="msgTip" class="div01">msg tip here</div>
</body>
</html>