-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.html
36 lines (29 loc) · 1 KB
/
example.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
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Tools4Tips</title>
<link type="text/css" rel="stylesheet" href="example.css"/>
<link type="text/css" rel="stylesheet" href="tools4tips.css"/>
<script src="jquery-1.8.1.min.js"></script>
<script src="tools4tips.js"></script>
</head>
<body>
<div id="box" data-tooltip="This is a box">
<button type="button" title="Click here to add more content">Add more content</button>
<div id="content-box" title="Here more content will appear">
</div>
</div>
<script>
$(function (){
//tooltip
$('*[data-tooltip], *[title]:not([title=""])').tools4tips();
$('button').on('click', function (){
$('#content-box').append(
$('<div></div>').attr('title','Content: ' + (1 + $('#content-box > div').size())).html('some item')
)
});
});
</script>
</body>
</html>