-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathshow.js
44 lines (44 loc) · 826 Bytes
/
show.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
$(document).ready(function()
{
var url=window.location.href;
$("a").mouseenter(function()
{
var str=$(this).attr('href');
if(str.match("^//"))
{
var current_url="https:"+str;
}
else if(str.match("^/"))
{
var current_url=url-"/"+str;
}
else
{
var current_url=str;
}
$(this).append("<div class='popup'></div>");
$(".popup").append(current_url);
var pos = $(this).position();
var top = pos.top-"20";
var left = pos.left-"30";
$(".popup").css({
position:"absolute",
top:top,
left:left,
"z-index":"1",
"display":"block",
"width":"auto",
"height":"auto",
"padding":"5",
"color":"#FFF",
"background":"#535663",
"font-size":"11",
"text-decoration":"none",
"border-radius":"6"
});
})
.mouseleave(function()
{
$(".popup").remove();
});
});