-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
55 lines (46 loc) · 1.99 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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>jquery.codabubble</title>
<style type="text/css" media="screen">
.bubbleInfo { position: relative; margin: 10px 50px; width: 500px; }
.appended { background: salmon; }
.popup { background: rgba(0,0,0,0.6); color: #fff; padding: 0.5em; position: absolute; display: none; width: 300px; }
</style>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="jquery.codabubble.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
$(function(){
$('.bubbleInfo').codabubble({
direction: 'down',
offset: 30
});
$('#add').click(function(){
var html = '<div class="bubbleInfo appended"><p class="cut trigger">+ $3.50 GS fee (appended)</p><div class="popup"><p>Appended via js. Gamestaq charges a small fee to each the buyer and the seller to keep things going.</p></div></div>';
$('.bubbleInfo:last').after( html )
});
$('#update').click(function(){
$('.bubbleInfo').codabubble({
direction: 'right',
offset: function(popup, container){
return -popup.outerWidth();
}
});
});
});
</script>
</head>
<body>
<h1>jquery.codabubble</h1>
<div class="bubbleInfo">
<p class="cut trigger">+ $1.50 GS fee</p>
<div class="popup">
<p>Gamestaq charges a small fee to each the buyer and the seller to keep things going.</p>
</div>
</div>
<button id="add">Add instance</button>
<button id="update">update $.codabubble()</button>
</body>
</html>