Skip to content
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

Adding correct answer on event #2

Closed
erikickes opened this issue Sep 24, 2018 · 1 comment
Closed

Adding correct answer on event #2

erikickes opened this issue Sep 24, 2018 · 1 comment

Comments

@erikickes
Copy link

Unless i'm missing something there does not seem to be a way to highlight the correct answer when they pick an incorrect one. We would like to be able to highlight the red chosen option but also indicate the correct option in green. Perhaps this can be done in callbacks but we're not finding a way to index it.

@jchamill
Copy link
Owner

I've updated the answer callback to send the current question object as the 3rd parameter. Note the second parameter has been updated as well. It was a boolean that was true if the answer was correct, false if incorrect. It is now the selected question index. You can see the demo/callbacks.html example to see how to highlight the correct index if the question was incorrect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants