Skip to content

Commit fb8b824

Browse files
committed
update node
1 parent aaa5b78 commit fb8b824

File tree

10 files changed

+105
-18
lines changed

10 files changed

+105
-18
lines changed

jquery/.idea/workspace.xml

Lines changed: 45 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2+
"http://www.w3.org/TR/html4/loose.dtd">
3+
<html>
4+
<head>
5+
<title>文字提示</title>
6+
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
7+
<!-- 引入jQuery -->
8+
<script src="../../scripts/jquery.js" type="text/javascript"></script>
9+
<style type="text/css">
10+
body{
11+
margin:0;
12+
padding:40px;
13+
background:#fff;
14+
font:80% Arial, Helvetica, sans-serif;
15+
color:#555;
16+
line-height:180%;
17+
}
18+
p{
19+
clear:both;
20+
margin:0;
21+
padding:.5em 0;
22+
}
23+
/* tooltip */
24+
#tooltip{
25+
position:absolute;
26+
border:1px solid #333;
27+
background:#f7f5d1;
28+
padding:1px;
29+
color:#333;
30+
display:none;
31+
}
32+
</style>
33+
<script type="text/javascript">
34+
$(document).ready(function () {
35+
$("a.tooltip").onmouseover(function (e) {
36+
var tooltip = "<div id='tooltip'>"+this.title+ "<\/div>" ; // div 创建
37+
$("body").append(tooltip);
38+
39+
$("#tooltip").css({
40+
"top":e.pageY+"px",
41+
"left":e.payX+"px"
42+
}).show("fast"); // 设置 X,Y坐标并且显示
43+
44+
}).onmouseout(function () {
45+
$("#tooltip").remove(); // 移除
46+
});
47+
});
48+
49+
</script>
50+
51+
</head>
52+
<body>
53+
54+
<p> <a href="#" class="tooltip" title="这是我的超链接提示1.">提示1.</a></p>
55+
<p> <a href="#" class="tooltip" title="这是我超链接提示2.">提示2.</a></p>
56+
<p> <a href="#" title="这是自带提示1.">自带提示1. </a></p>
57+
<p><a href="#" title="这是自带提示2.">自带提示2. </a></p>
58+
59+
</body>
60+
</html>
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)