wScratchPad | jQuery Scratch Pad Plugin | Frontend Framework library
kandi X-RAY | wScratchPad Summary
kandi X-RAY | wScratchPad Summary
A jQuery plugin to mimic a scratch card or pad behaviour. Allowing you to scratch off an overlay as either a color or image.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Get scratch pad .
- Creates a scratch pad
- private methods Calculate the array
- check if a or not
- the algorithm for the polyfill
- Hides a colour .
- Merge two nodes .
- check if the callback is true
- Get the current element .
- Compare two nodes .
wScratchPad Key Features
wScratchPad Examples and Code Snippets
Community Discussions
Trending Discussions on wScratchPad
QUESTION
I have a scratch card i'm creating using the jQuery and websanova/wScratchPad.
The scratch pad is working well, but it's supposed to pop up a new container and a button once 50% of the surface is revealed. It is not.
Here is the link to the glitch server https://best-gambler.glitch.me/
I've searched for a solution online, but haven't come up with one.
Here is the HTML file
...ANSWER
Answered 2019-Jan-25 at 16:39Your scratchMove
function should be with an additional parameter e
that represents the mouse move event. I think you missed that from the documentation. I just tested it locally and it works.
Also, take care that you reinitialize the promoCode
variable in that if-else statement: var promoCode = '';
. If the images would have been different and promoCode would have been bg3
(which is true since bg1, bg2 and bg3 are equal), it wouldn't work.
QUESTION
https://github.com/websanova/wScratchPad/blob/master/src/wScratchPad.js
I have a button that creates an scratch pad on an element by ID. ($("#test").wScratchPad({optionshere}
);
And it works just fine, but then I want to click the button and generate a new one. (the numbers are randomly generated on the image)
But, I've tried:
...ANSWER
Answered 2017-Oct-28 at 04:51Solved this. Apparently I couldn't create a new scratchpad on an existing one, (perhaps my fault, idk) so I decided to simply remove the old div, and create a new one.
This wouldn't work either. Now I finally figured out I could do that (the removing & recreating of the div) if I added the CSS that was required, using ELEMENT.css().css() etc. (the element required a certain width/height)
Not sure why it wouldn't work to just replace it with my current scratchpad (since it would keep the CSS) but oh well! Works.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install wScratchPad
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page