Random quote machine - Bug when switching quote

Hi all,

I’m currently trying to build a Random quote machine.

I’m building it step-by-step and I just wrote the basic JS code to change the quote on click.

However, it seems the JS code has a bug.

Indeed, everytime I click on the “refresh” icon :

  • there is a white screen for 1sec and;
  • it seems that the quote changes twice (once on click and once automatically…)

I don’t understand why…

Any help ?

Thank you :slight_smile:

Nice!

Thank you very much for your help Randell!

Now I just have to make the icon looks like a link with css (use the pointer cursor).

Thanks once again :slight_smile: