JavaScript to reset Freeform drag-and-drop on second attempt
Jun 11, 2019
By
Janet Mudd
I have two freeform slides, one for a grade and one not. However, when the user clicks try again (for second attempt when wrong) the answer choices are not reset on the page - - and it shows only the drop objects. Yes, I have the slide properties set to "reset to initial state" when revisiting but it isn't working.
Does anyone know a javascript that can be added as a trigger to the page to have it reset all answer choices?
See attached Storyline 360 file for reference.
Okay, so got the first slide to work, but not the second. Found a great video in another post. What am I not seeing on the second slide?
3 Replies
Javascript would do this, the try again button doesn't reload the slide it just hides the layer.
The simple way is to add a variable to count attempts and then jump to the current slide when the user gets it wrong. You need to add in some logic to control when the incorrect layer is shown.
Your example is not working because you are reusing the try again variable. you need to use a different variable or set in place triggers to reset the try again variable under certain conditions.
Thank you! That was exactly what I was missing.
This discussion is closed. You can start a new discussion or contact Articulate Support.