-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
81 lines (78 loc) · 2.17 KB
/
index.html
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>jQuery picTags</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="author" content="Feng Hsin Chiao" />
<meta name="keywords" content="php,jquery,hsin,website,webdesign,fenghsinchiao,html,css" />
<link rel="stylesheet" href="jquery.picTags/normalize.css" />
<link rel="stylesheet" href="jquery.picTags/jquery.picTags.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="jquery.picTags/jquery.picTags.js"></script>
</head>
<body>
<h1>jQuery picTags</h1>
<div>
<div style="padding:20px;" >
<img class="picTags" src="picTagsImage.jpg" alt="picTagsImage" title="picTagsImage">
</div>
</div>
<script>
$(function(){
var options = {
// Aligning the text popups
align: {
x: 'center', // left, center or right
y: 'top' // top, center or bottom
},
// The (relative) offset of the popups in pixels
offset: {
left: 0, // horizontal offset
top: 20 // vertical offset
},
handlers: {
mouseover: 'show',
mouseleave: 'hide',
/*
click: function(e, data){
location.href = data.url;
}
*/
},
updateInfo : function(){
}
};
var data = [
{
x: 0.35,
y: 0.4,
text: '狗狗汪汪叫'
,attributes: {
id: 'dog', // id is necessary
},
position: 'left' // top, bottom, left, right
},
{
x: 0.68,
y: 0.66,
text: '小貓喵喵叫'
,attributes: {
id: 'cat', // id is necessary
},
position: 'right' // top, bottom, left, right
},
{
x: 0.8,
y: 0.2,
text: '沒有指定 position, 則是依照 options 中的規則'
,attributes: {
id: 'nothing', // id is necessary
},
//position: 'right' // top, bottom, left, right
},
];
var picTags = $('.picTags').picTags( options, data );
});
</script>
</body>
</html>