vendredi 18 novembre 2016

Set a button to randomly appear at different times and disappear when clicked

I am currently developing my own little mini clicker game in HTMl/CSS/JS. I have completed the big picture and am now trying to add cool little additions. I have seen this done in another clicker game and all the code I have found and experimented with has not done what I wanted it to do.

I want:

  • A button to appear at random times

  • The button to disappear when clicked once

  • The button to constantly be reappearing at random times

For my button it is the following:

<button onclick="addSeptims()" id="hidden" class=""> Click me for free Septims! </button>

Css:

#hidden {
color: #ff6600;
margin-left: 37.5%;
visibility: hidden;
}
#suprise.visible {
visibility: visible;
}




Aucun commentaire:

Enregistrer un commentaire