1
+ <!DOCTYPE html>
2
+ < html lang ="en ">
3
+ < head >
4
+ < meta charset ="UTF-8 ">
5
+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
6
+ < title > Wscratchpad by Websanova</ title >
7
+ < meta name ="description " content ="jQuery Scratch Pad Plugin ">
8
+ < meta name ="author " content ="websanova ">
9
+ < meta name ="robots " content ="index, follow ">
10
+ <!-- Canonical URL -->
11
+ < link rel ="canonical " href ="https://codehimblog.github.io/jquery-plugins/wscratchpad-by-websanova.html ">
12
+ <!-- Favicon -->
13
+ < link rel ="icon " href ="/favicon.ico " type ="image/png ">
14
+ <!-- Bootstrap CSS -->
15
+ < link href ="
https://cdn.jsdelivr.net/npm/[email protected] /dist/css/bootstrap.min.css "
rel ="
stylesheet "
>
16
+ <!-- Bootstrap Icons -->
17
+ < link href ="https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.css " rel ="stylesheet ">
18
+ < link rel ="stylesheet " href ="/css/styles.css ">
19
+ </ head >
20
+ < body >
21
+ <!-- Navbar -->
22
+ < nav class ="navbar navbar-expand-lg navbar-dark bg-dark fixed-top ">
23
+ < div class ="container ">
24
+ < a class ="navbar-brand " href ="https://codehimblog.github.io ">
25
+ < i class ="bi bi-box-seam me-2 "> </ i > CodehimBlog
26
+ </ a >
27
+ < button class ="navbar-toggler " type ="button " data-bs-toggle ="collapse " data-bs-target ="#navbarNav " aria-controls ="navbarNav " aria-expanded ="false " aria-label ="Toggle navigation ">
28
+ < span class ="navbar-toggler-icon "> </ span >
29
+ </ button >
30
+ < div class ="collapse navbar-collapse " id ="navbarNav ">
31
+ < ul class ="navbar-nav ms-auto ">
32
+ < li class ="nav-item ">
33
+ < a class ="nav-link " href ="https://codehimblog.github.io/ "> < i class ="bi bi-house-door me-1 "> </ i > Home</ a >
34
+ </ li >
35
+ < li class ="nav-item ">
36
+ < a class ="nav-link " href ="https://codehimblog.github.io/projects/ "> < i class ="bi bi-box me-1 "> </ i > Projects</ a >
37
+ </ li >
38
+ < li class ="nav-item ">
39
+ < a class ="nav-link " href ="https://codehimblog.github.io/about.html "> < i class ="bi bi-book me-1 "> </ i > About</ a >
40
+ </ li >
41
+ < li class ="nav-item ">
42
+ < a class ="nav-link " href ="https://codehimblog.github.io/contact.html "> < i class ="bi bi-envelope me-1 "> </ i > Contact</ a >
43
+ </ li >
44
+ </ ul >
45
+ </ div >
46
+ </ div >
47
+ </ nav >
48
+
49
+ <!-- Breadcrumbs -->
50
+ < div class ="container mt-4 breadcrumbs ">
51
+ < nav aria-label ="breadcrumb ">
52
+ < ol class ="breadcrumb mb-0 ">
53
+ < li class ="breadcrumb-item "> < a href ="https://codehimblog.github.io/ "> Home</ a > </ li >
54
+ < li class ="breadcrumb-item "> < a href ="https://codehimblog.github.io/jquery-plugins/ "> jQuery Plugins</ a > </ li >
55
+ < li class ="breadcrumb-item active " aria-current ="page "> Wscratchpad</ li >
56
+ </ ol >
57
+ </ nav >
58
+ </ div >
59
+
60
+ <!-- Schema Markup for Breadcrumbs -->
61
+ < script type ="application/ld+json ">
62
+ {
63
+ "@context" : "https://schema.org" ,
64
+ "@type" : "BreadcrumbList" ,
65
+ "itemListElement" : [
66
+ {
67
+ "@type" : "ListItem" ,
68
+ "position" : 1 ,
69
+ "name" : "Home" ,
70
+ "item" : "https://codehimblog.github.io/"
71
+ } ,
72
+ {
73
+ "@type" : "ListItem" ,
74
+ "position" : 2 ,
75
+ "name" : "jQuery Plugins" ,
76
+ "item" : "https://codehimblog.github.io/jquery-plugins/"
77
+ } ,
78
+ {
79
+ "@type" : "ListItem" ,
80
+ "position" : 3 ,
81
+ "name" : "Wscratchpad" ,
82
+ "item" : "https://codehimblog.github.io/projects/{{packageSlug}}"
83
+ }
84
+ ]
85
+ }
86
+ </ script >
87
+ <!-- Main Content -->
88
+ < div class ="container mt-3 ">
89
+ < div class ="row ">
90
+ <!-- Main Details -->
91
+ < main class ="col-md-8 site-main p-0 ">
92
+ < article >
93
+ <!-- Project Name & Description -->
94
+ < h1 id ="packageName "> Wscratchpad</ h1 >
95
+ < p id ="packageDescription " class ="text-muted "> jQuery Scratch Pad Plugin</ p >
96
+
97
+
98
+
99
+ <!-- Statistics -->
100
+ < div class ="stat-row d-flex justify-content-around align-items-center text-center mb-2 ">
101
+ < div class ="stat-box d-flex align-items-center flex-column-mobile ">
102
+ < i class ="bi bi-star-fill text-warning mb-2 "> </ i >
103
+ < div >
104
+ < span id ="stargazersCount " class ="stat-value "> 388</ span >
105
+ < p class ="stat-label mb-0 "> Stars</ p >
106
+ </ div >
107
+ </ div >
108
+
109
+ < div class ="stat-box d-flex align-items-center flex-column-mobile ">
110
+ < i class ="bi bi-box-arrow-in-down mb-2 "> </ i >
111
+ < div >
112
+ < span id ="repoSize " class ="stat-value "> 0.85 MB</ span >
113
+ < p class ="stat-label mb-0 "> Size</ p >
114
+ </ div >
115
+ </ div >
116
+
117
+ < div class ="stat-box d-flex align-items-center flex-column-mobile ">
118
+ < i class ="bi bi-arrow-repeat text-secondary mb-2 "> </ i >
119
+ < div >
120
+ < span id ="forksCount " class ="stat-value "> 176</ span >
121
+ < p class ="stat-label mb-0 "> Forks</ p >
122
+ </ div >
123
+ </ div >
124
+
125
+ < div class ="stat-box d-flex align-items-center flex-column-mobile ">
126
+ < i class ="bi bi-exclamation-circle text-danger mb-2 "> </ i >
127
+ < div >
128
+ < span id ="openIssuesCount " class ="stat-value "> 32</ span >
129
+ < p class ="stat-label mb-0 "> Open Issues</ p >
130
+ </ div >
131
+ </ div >
132
+ </ div >
133
+
134
+
135
+ < div class ="ad-unit ad-apt ">
136
+ < script async src ="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-7089100907045419 "
137
+ crossorigin ="anonymous "> </ script >
138
+ <!-- CodehimBlog APT -->
139
+ < ins class ="adsbygoogle "
140
+ style ="display:block "
141
+ data-ad-client ="ca-pub-7089100907045419 "
142
+ data-ad-slot ="4990741913 "
143
+ data-ad-format ="auto "
144
+ data-full-width-responsive ="true "> </ ins >
145
+ < script >
146
+ ( adsbygoogle = window . adsbygoogle || [ ] ) . push ( { } ) ;
147
+ </ script >
148
+ </ div >
149
+
150
+ < div class ="row mb-4 ">
151
+ <!-- Tabs (Left) -->
152
+ < div class ="col-12 col-md-6 d-flex justify-content-start mb-3 mb-md-0 ">
153
+ < ul class ="nav nav-tabs " id ="infoTabs " role ="tablist ">
154
+ < li class ="nav-item " role ="presentation ">
155
+ < button class ="nav-link active " id ="installation-tab " data-bs-toggle ="tab " data-bs-target ="#installation " type ="button " role ="tab " aria-controls ="installation " aria-selected ="true ">
156
+ < i class ="bi bi-file-earmark-text "> </ i > Readme
157
+ </ button >
158
+ </ li >
159
+ < li class ="nav-item " role ="presentation ">
160
+ < button class ="nav-link " id ="changelog-tab " data-bs-toggle ="tab " data-bs-target ="#changelog " type ="button " role ="tab " aria-controls ="changelog " aria-selected ="false ">
161
+ < i class ="bi bi-journal-text me-2 "> </ i > Changelog
162
+ </ button >
163
+ </ li >
164
+ </ ul >
165
+ </ div >
166
+
167
+ <!-- Action Buttons (Right) -->
168
+ < div class ="col-12 col-md-6 d-flex align-items-center justify-content-end ">
169
+ < a href ="https://github.com/websanova/wScratchPad/archive/refs/heads/master.zip " class ="btn btn-primary me-2 action-btn " id ="downloadBtn ">
170
+ < i class ="bi bi-cloud-download me-2 "> </ i > Download ZIP
171
+ </ a >
172
+ < a href ="https://github.com/websanova/wScratchPad " target ="_blank " class ="btn btn-outline-secondary action-btn " id ="githubBtn ">
173
+ < i class ="bi bi-github me-2 "> </ i > Fork on GitHub
174
+ </ a >
175
+ </ div >
176
+ </ div >
177
+ < div class ="tab-content mt-3 " id ="infoTabsContent ">
178
+ < div class ="tab-pane fade show active " id ="installation " role ="tabpanel " aria-labelledby ="installation-tab ">
179
+ < h1 > wScratchPad.js</ h1 >
180
+ < p > A jQuery plugin to mimic a scratch card or pad behaviour. Allowing you to scratch off an overlay as either a color or image.</ p >
181
+ < ul >
182
+ < li > < a href ="http://wscratchpad.websanova.com "> View the wScratchPad demo</ a > </ li >
183
+ < li > < a href ="https://github.com/websanova/wScratchPad/tags "> Download the lastest version of wScratchPad</ a > </ li >
184
+ </ ul >
185
+ < h2 > Related Plugins</ h2 >
186
+ < ul >
187
+ < li > < a href ="http://wpaint.websanova.com "> wPaint</ a > - Simple paint drawing plugin.</ li >
188
+ < li > < a href ="http://wcolorpicker.websanova.com "> wColorPicker</ a > - Color pallette seleciton plugin.</ li >
189
+ </ ul >
190
+ < h2 > Settings</ h2 >
191
+ < p > Available options with notes, the values here are the defaults.</ p >
192
+ < pre class ="prettyprint linenums lang-language "> < code > $('#elem').wScratchPad({
193
+ size : 5, // The size of the brush/scratch.
194
+ bg : '#cacaca', // Background (image path or hex color).
195
+ fg : '#6699ff', // Foreground (image path or hex color).
196
+ realtime : true, // Calculates percentage in realitime.
197
+ scratchDown : null, // Set scratchDown callback.
198
+ scratchUp : null, // Set scratchUp callback.
199
+ scratchMove : null, // Set scratcMove callback.
200
+ cursor : 'crosshair' // Set cursor.
201
+ });</ code > </ pre >
202
+ < p > Note on < code > realtime</ code > , if set to < code > false</ code > this will only send percentage calculations to the < code > scratchUp</ code > and should be used to increase performance.</ p >
203
+ < p > Note on < code > bg</ code > and < code > fg</ code > , these can be eitehr a valid hex color beginning with < code > #</ code > otherwise it will default to trying to set an image.</ p >
204
+ < h2 > Examples</ h2 >
205
+ < p > Include the following files:</ p >
206
+ < pre class ="prettyprint linenums lang-language "> < code > <script type="text/javascript" src="./wScratchPad.min.js"></script></ code > </ pre >
207
+ < h3 > Percent scratched</ h3 >
208
+ < pre class ="prettyprint linenums lang-language "> < code > $("#elem").wScratchPad({
209
+ scratchDown: function(e, percent){ console.log(percent); },
210
+ scratchMove: function(e, percent){ console.log(percent); },
211
+ scratchUp: function(e, percent){ console.log(percent); }
212
+ });</ code > </ pre >
213
+ < h3 > Update on the Fly</ h3 >
214
+ < pre class ="prettyprint linenums lang-language "> < code > var sp = $("#elem").wScratchPad();
215
+
216
+ sp.wScratchPad('size', 5);
217
+ sp.wScratchPad('cursor', 'url("./cursors/coin.png") 5 5, default');
218
+
219
+ // Or directly with element.
220
+
221
+ $("#elem").wScratchPad('image', './images/winner.png');</ code > </ pre >
222
+ < h3 > Methods</ h3 >
223
+ < pre class ="prettyprint linenums lang-language "> < code > $('#elem').wScratchPad('reset');
224
+ $('#elem').wScratchPad('clear');
225
+ $('#elem').wScratchPad('enabled', <boolean>);</ code > </ pre >
226
+ < h2 > Resources</ h2 >
227
+ < ul >
228
+ < li > < a href ="http://websanova.com/plugins "> More jQuery plugins by Websanova</ a > </ li >
229
+ < li > < a href ="http://websanova.com/extensions "> Websanova JavaScript Extensions Project</ a > </ li >
230
+ < li > < a href ="http://wboiler.websanova.com "> jQuery Plugin Development Boilerplate</ a > </ li >
231
+ < li > < a href ="http://www.websanova.com/blog/jquery/the-ultimate-guide-to-writing-jquery-plugins "> The Ultimate Guide to Writing jQuery Plugins</ a > </ li >
232
+ </ ul >
233
+ < h2 > License</ h2 >
234
+ < p > MIT licensed</ p >
235
+ < p > Copyright (C) 2011-2012 Websanova < a href ="http://www.websanova.com "> http://www.websanova.com</ a > </ p >
236
+ </ div >
237
+
238
+ < div class ="tab-pane fade " id ="changelog " role ="tabpanel " aria-labelledby ="changelog-tab ">
239
+ < ul id ="changelogList ">
240
+ No changelog available.
241
+ </ ul >
242
+ </ div >
243
+
244
+ </ div >
245
+
246
+ < div class ="tags mb-2 mt-2 ">
247
+
248
+ </ div >
249
+
250
+ </ article >
251
+
252
+
253
+ </ main >
254
+ <!-- Sidebar -->
255
+ < aside class ="col-md-4 p-0 ">
256
+ < div class ="sidebar ">
257
+ <!-- Owner Section -->
258
+ < div class ="sidebar-item mb-4 ">
259
+ < div class ="ad-unit ">
260
+ < script async src ="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-7089100907045419 "
261
+ crossorigin ="anonymous "> </ script >
262
+ <!-- CodehimBlog Sidebar -->
263
+ < ins class ="adsbygoogle "
264
+ style ="display:block "
265
+ data-ad-client ="ca-pub-7089100907045419 "
266
+ data-ad-slot ="8929986923 "
267
+ data-ad-format ="auto "
268
+ data-full-width-responsive ="true "> </ ins >
269
+ < script >
270
+ ( adsbygoogle = window . adsbygoogle || [ ] ) . push ( { } ) ;
271
+ </ script >
272
+ </ div >
273
+ < div class ="d-flex align-items-center ">
274
+ < img src ="https://avatars.githubusercontent.com/u/1645771?v=4 " alt ="Owner Avatar " class ="rounded-circle me-2 owner-avatar ">
275
+ < a href ="https://github.com/websanova " target ="_blank " id ="ownerName " class ="sidebar-link "> websanova</ a >
276
+ </ div >
277
+ </ div >
278
+
279
+ <!-- Metadata Section -->
280
+ < div class ="sidebar-item mb-2 ">
281
+ < div class ="metadata-item d-flex align-items-center ">
282
+ < i class ="bi bi-calendar me-2 "> </ i >
283
+ < strong > Created At:</ strong >
284
+ < span id ="createdAt " class ="ms-1 "> April 15, 2012</ span >
285
+ </ div >
286
+ < div class ="metadata-item d-flex align-items-center mt-2 ">
287
+ < i class ="bi bi-pencil-square me-2 "> </ i >
288
+ < strong > Last Updated:</ strong >
289
+ < span id ="updatedAt " class ="ms-1 "> September 23, 2024</ span >
290
+ </ div >
291
+ < div class ="metadata-item d-flex align-items-center mt-2 ">
292
+ < i class ="bi bi-file-earmark-code me-2 "> </ i >
293
+ < strong > Language:</ strong >
294
+ < span id ="language " class ="ms-1 "> JavaScript</ span >
295
+ </ div >
296
+
297
+ < div class ="metadata-item d-flex align-items-center mt-2 ">
298
+ < i class ="bi bi-shield-check "> </ i >
299
+ < strong > License:</ strong >
300
+ < span id ="license " class ="ms-1 "> Unknown</ span >
301
+ </ div >
302
+ < a href ="http://www.websanova.com/plugins/websanova/scratchpad " target ="_blank " class ="btn btn-outline-dark btn-sm " id ="homepageBtn ">
303
+ < i class ="bi bi-house-door me-2 "> </ i > Visit Homepage
304
+ </ a >
305
+
306
+ </ div >
307
+
308
+ < div class ="sidebar-item mb-2 ">
309
+ < h5 class ="sidebar-title "> Dependencies</ h5 > < ul class ="dependencies-list "> < li > grunt-contrib-uglify ()</ li > < li > grunt-contrib-jshint ()</ li > </ ul >
310
+ </ div >
311
+
312
+ < div class ="sidebar-item ">
313
+ < h5 class ="sidebar-title "> Contributors</ h5 >
314
+ < ul class ="p-0 " id ="contributorsList ">
315
+ < ul class ="list-group list-group-flush " id ="contributorsList "> < li class ="list-group-item d-flex align-items-center contributor-item "> < img src ="https://avatars.githubusercontent.com/u/1645771?v=4 " alt ="websanova " class ="rounded-circle me-3 " style ="width: 40px; height: 40px; "> < div > < a href ="https://github.com/websanova " target ="_blank " class ="text-decoration-none fw-bold "> websanova</ a > < p class ="mb-0 text-muted small "> 48 contributions</ p > </ div > </ li > < li class ="list-group-item d-flex align-items-center contributor-item "> < img src ="https://avatars.githubusercontent.com/u/73737?v=4 " alt ="grexican " class ="rounded-circle me-3 " style ="width: 40px; height: 40px; "> < div > < a href ="https://github.com/grexican " target ="_blank " class ="text-decoration-none fw-bold "> grexican</ a > < p class ="mb-0 text-muted small "> 1 contributions</ p > </ div > </ li > < li class ="list-group-item d-flex align-items-center contributor-item "> < img src ="https://avatars.githubusercontent.com/u/1893578?v=4 " alt ="RichardVanDerMeer " class ="rounded-circle me-3 " style ="width: 40px; height: 40px; "> < div > < a href ="https://github.com/RichardVanDerMeer " target ="_blank " class ="text-decoration-none fw-bold "> RichardVanDerMeer</ a > < p class ="mb-0 text-muted small "> 1 contributions</ p > </ div > </ li > < li class ="list-group-item d-flex align-items-center contributor-item "> < img src ="https://avatars.githubusercontent.com/u/7960103?v=4 " alt ="KernCheh " class ="rounded-circle me-3 " style ="width: 40px; height: 40px; "> < div > < a href ="https://github.com/KernCheh " target ="_blank " class ="text-decoration-none fw-bold "> KernCheh</ a > < p class ="mb-0 text-muted small "> 1 contributions</ p > </ div > </ li > < li class ="list-group-item d-flex align-items-center contributor-item "> < img src ="https://avatars.githubusercontent.com/u/1105060?v=4 " alt ="smnarnold " class ="rounded-circle me-3 " style ="width: 40px; height: 40px; "> < div > < a href ="https://github.com/smnarnold " target ="_blank " class ="text-decoration-none fw-bold "> smnarnold</ a > < p class ="mb-0 text-muted small "> 1 contributions</ p > </ div > </ li > </ ul >
316
+ </ ul >
317
+
318
+ </ div >
319
+
320
+ < div class ="ad-unit ">
321
+ < script async src ="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-7089100907045419 "
322
+ crossorigin ="anonymous "> </ script >
323
+ <!-- CodehimBlog Skyscrapper -->
324
+ < ins class ="adsbygoogle "
325
+ style ="display:block "
326
+ data-ad-client ="ca-pub-7089100907045419 "
327
+ data-ad-slot ="7469565592 "
328
+ data-ad-format ="auto "
329
+ data-full-width-responsive ="true "> </ ins >
330
+ < script >
331
+ ( adsbygoogle = window . adsbygoogle || [ ] ) . push ( { } ) ;
332
+ </ script >
333
+ </ div >
334
+
335
+ </ div >
336
+ </ aside >
337
+ </ div >
338
+ </ div >
339
+ <!-- Footer -->
340
+ < footer class ="bg-dark text-white text-center py-3 page-footer ">
341
+ < div class ="container ">
342
+ < p class ="mb-2 "> © 2024 CodehimBlog - Powered by GitHub</ p >
343
+ < nav >
344
+ < ul class ="list-inline mb-0 ">
345
+ < li class ="list-inline-item ">
346
+ < a href ="/privacy-policy.html " class ="footer-link "> Privacy Policy</ a >
347
+ </ li >
348
+ < li class ="list-inline-item ">
349
+ < span class ="text-white "> |</ span >
350
+ </ li >
351
+ < li class ="list-inline-item ">
352
+ < a href ="/terms-and-conditions.html " class ="footer-link "> Terms and Conditions</ a >
353
+ </ li >
354
+ </ ul >
355
+ </ nav >
356
+ </ div >
357
+ </ footer >
358
+ <!-- Bootstrap Bundle JS -->
359
+ < script src ="
https://cdn.jsdelivr.net/npm/[email protected] /dist/js/bootstrap.bundle.min.js "
> </ script >
360
+ < script src ="https://cdn.jsdelivr.net/gh/google/code-prettify@master/loader/run_prettify.js "> </ script >
361
+ < script src ="/js/script.js "> </ script >
362
+ <!-- Google tag (gtag.js) -->
363
+ < script async src ="https://www.googletagmanager.com/gtag/js?id=G-FG2ZX76XGT "> </ script >
364
+ < script >
365
+ window . dataLayer = window . dataLayer || [ ] ;
366
+ function gtag ( ) { dataLayer . push ( arguments ) ; }
367
+ gtag ( 'js' , new Date ( ) ) ;
368
+
369
+ gtag ( 'config' , 'G-FG2ZX76XGT' ) ;
370
+ </ script >
371
+ </ body >
372
+ </ html >
0 commit comments