-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
why the reset button dosnt work? #4
Comments
Hi, What are you doing in the handler of the reset button? Regards |
its ok i fix that thanks :) i add that to my JS file: |
Actually you should be able to bind to the reset function. What you are doing is creating a new instance of the scratchcard object which works since this will fill the scratchcard with color again but is not the recommended way. Try the following: const scratch = new ScratchCard(options);
document.getElementById('myButton').addEventListener('click', () => {
scratch.reset();
}); |
u can give me your skype |
Sorry I do not use Skype. |
https://hastebin.com/emovikugop.http |
? |
hi i use your script
but when i click to reset button i get error:
hadar.html:57 Uncaught ReferenceError: reset is not defined
at HTMLDivElement.onclick (hadar.html:57)
plz fix that
thanks
The text was updated successfully, but these errors were encountered: