There is a presentation . On slide 2 in the debug console for easier debugging, the variable i2 is displayed and which "case" worked in the switch-case loop. When you switch to slide 3, the i2 and i3 variable is displayed in the debug console. It is necessary to remove i2.

PS: Reveal.addEventListener('slide2', function() { someCode }); - this piece of code animates images when displaying slide2.

  • To be honest, I personally did not understand at all what was specifically required. I launched your page, walked back and forth, a lot of lines are displayed in the logs with each press, for example, slide 2 default right test4.html:27069 4 test4.html:27167 slide 3 default right test4.html:27171 4 test4.html:27065 slide 2 default right test4.html:27069 4 test4.html:27167 slide 3 default right test4.html:27171 4 test4.html:27065 slide 2 default right test4.html:27069 4 test4.html:27157 slide 3 case 2 right test4.html:27158 3 . Which i2 you just need to remove - Dred
  • After you switched to slide 3 with a blank screen, 4 labels appeared in the debug console: slide 2 default right, then 4 is i2 ($ ('# rightbut'). Click (function () -> switch (i2) -> default). And then slide 3 default right, then 1 - this is setting the variable i3 to the value 1 ($ ('# rightbut'). click (function () -> switch (i3) -> default) - csharperbegin
  • you have a problem not only in i2, you go to i4 and then back. You will have i2 / i3 / i4 immediately. You have an error in the iteration, apparently somewhere here while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) { event.currentTarget = matched.elem; but I could be wrong - Dred
  • Dred, what did you debug the code in and how did you find? Thank. - csharperbegin
  • @ csharperbeginSo I have not found anything yet. I just assumed. Debazhil in Chrome-> F12. Put a breakpoint on switch () and then go to StepInto (F11) and see how your code went further. Or rather, you need to go not with the switch but from the method itself, which starts you to turn the page and create the first animation, since you already have i2 at the very beginning - Dred

0