Different interactions on a button tap trigger

How to change colors many time with tap of a single button?
Like: https://ruya.digital/ on this button on lower right corner?
image

Which color would you like to change? Of a button or a background?

A backround and some text, 5 different colors on 5 taps.

<script>
  $(document).ready(function(){
    var yourColors = ["blue", "green", "red", "pink", "grey"];
    var count = 0;

    $(".w-button").click(
      function(){changeColor()
      });
    function changeColor() {
     $(".target").css("backgroundColor",yourColors[count]);
     count++;
    };    
  });
  // You have to publish your site first!
</script>

“target” is your background
“w-button” is your button

1 Like

Thanks! I will try it.