In writing the game I created, there is a grid filled with words. The goal of the game is to write down words by clicking on the letters on the side that enliven into empty places in the grid. Words are highlighted if they need to be written, so the user can see where to go next. The goal of the game is to write down the required number of words in the grid to complete the game. I usually set this to two, but just changed it to 3, and the program continues to break after I uttered the second word.
if (score.right == 3) { ................ ................ }
Usually, when you pronounce a word correctly, I use the click.trigger function to go to the next highlighted word in the grid. At the moment, after 2 correct programs, the program either simply does not go to the next, or returns to the last one and does not allow you to click the letters.
setTimeout(function() { jQuery('.next-question').trigger('click'); }, 1500);
I tried to go through breakpoints but cannot find the problem. Can someone help me get it working again and tell me where I am going wrong?
There are currently no tips or hints in my game to find the highlighted word that you should use the console. Try to answer two on the right, after which it will work.
Here is the fiddle for the broken one: http://jsfiddle.net/smilburn/Dxxmh/101/
Here is an example of the previous one that worked perfectly: http://jsfiddle.net/smilburn/Dxxmh/100/ (some class names could be changed)
Milo-j
source share