forked from websanova/wScratchPad
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
107 lines (92 loc) · 3.69 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width" />
<title>Websanova :: wScratchPad</title>
<!-- filestart -->
<link rel="icon" type="image/vnd.microsoft.icon" href="./demo/img/favicon.ico" />
<link rel="Stylesheet" type="text/css" href="./demo/demo.css" />
<script type="text/javascript" src="./lib/jquery.1.11.0.min.js"></script>
<!-- fileend -->
</head>
<body>
<!-- headstart -->
<header>
<a id="header-logo" href="http://websanova.com"></a>
<div id="header-links">
<a href="http://websanova.com">Blog</a>
<a href="http://websanova.com/plugins">Plugins</a>
<a href="http://websanova.com/extensions">Extensions</a>
<a href="http://websanova.com/services">Services</a>
</div>
</header>
<!-- headend -->
<div id="content">
<h1 id="plugin-name">wScratchPad.js</h1>
<div class="content-box">
<div id="demo1" class="scratchpad"></div>
<div id="demo1-percent"> </div>
<input type="button" value="Reset" onclick="$('#demo1').wScratchPad('reset');"/>
<input type="button" value="Clear" onclick="$('#demo1').wScratchPad('clear');"/>
<input type="button" value="Enable" onclick="$('#demo1').wScratchPad('enable', true);"/>
<input type="button" value="Disable" onclick="$('#demo1').wScratchPad('enable', false);"/>
<h3>Clear After 70 Percent Scratched</h3>
<div id="demo2" class="scratchpad"></div>
<div id="demo2-percent"> </div>
<input type="button" value="Reset" onclick="$('#demo2').wScratchPad('reset');"/>
<input type="button" value="Clear" onclick="$('#demo2').wScratchPad('clear');"/>
<input type="button" value="Enable" onclick="$('#demo2').wScratchPad('enable', true);"/>
<input type="button" value="Disable" onclick="$('#demo2').wScratchPad('enable', false);"/>
<style>
.scratchpad{
width: 35%;
height: 100px;
border: solid 1px;
}
@media (max-width: 500px) {
.scratchpad {
width: 65%;
}
}
</style>
<script type="text/javascript" src="./wScratchPad.min.js"></script>
<script type="text/javascript">
$('#demo1').wScratchPad({
bg: './images/winner.png',
fg: './images/scratch-to-win.png',
'cursor': 'url("./cursors/coin.png") 5 5, default',
scratchMove: function (e, percent) {
$('#demo1-percent').html(percent);
}
});
$('#demo2').wScratchPad({
bg: './images/winner.png',
fg: './images/scratch-to-win.png',
'cursor': 'url("./cursors/coin.png") 5 5, default',
scratchMove: function (e, percent) {
$('#demo2-percent').html(percent);
if (percent > 70) {
this.clear();
}
}
});
</script>
</div>
</div>
<!-- footstart -->
<footer>
<div id="footer-icons">
<!--a id="youtube-icon" href="http://websanova.com/youtube" target="_blank"></a-->
<a id="stumbleupon-icon" href="http://websanova.com/stumbleupon" target="_blank"></a>
<a id="linkedin-icon" href="http://websanova.com/linkedin" target="_blank"></a>
<a id="facebook-icon" href="http://websanova.com/facebook" target="_blank"></a>
<a id="googleplus-icon" href="http://websanova.com/googleplus" target="_blank"></a>
<a id="twitter-icon" href="http://websanova.com/twitter" target="_blank"></a>
<a id="github-icon" href="http://websanova.com/github" target="_blank"></a>
<a id="rss-icon" href="http://websanova.com/feed" target="_blank"></a>
</div>
</footer>
<!-- footend -->
</body>
</html>