-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
56 lines (48 loc) · 1.16 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Gistify in Action</title>
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script src="gistify.js"></script>
</head>
<body>
<button id="loadButton">Show</button>
<button id="loadButton2">Show (id embedded in div)</button>
<button id="editButton">Edit</button>
<button id="newButton">New</button>
<button id="appendButton">Append to form</button>
<div id="targetDiv"></div>
<div id="targetDiv2" data-gistid="5412353"></div>
<form id="sampleForm">
<input type="text">
<button type="submit"></button>
</form>
<script type="text/javascript">
$('#loadButton').click(function() {
$('#targetDiv').gistify({
mode:'show',
gistId:'5412353'
});
});
$('#editButton').click(function() {
$('#targetDiv').gistify({
mode:'edit',
gistId:'5412353'
});
});
$('#loadButton2').click(function() {
$('#targetDiv2').gistify();
});
$('#newButton').click(function() {
$('#targetDiv').gistify();
});
$('#appendButton').click(function() {
$('#targetDiv').gistify({
mode: 'appendToForm',
formSelector: '#sampleForm'
});
});
</script>
</body>
</html>