Toggle Button? | SoloLearn: Learn to code for FREE!


Toggle Button?

I need a way to create a toggle button for this counter. Google isn't helping and I have no clue where to start.

6/11/2018 9:33:00 AM

Daniel Cooper

9 Answers

New Answer


Like this?


It is not like what you wanted Daniel Cooper. But I have made it to stop and start a loop function from some help from stackoverflow. Maybe it can help you.



Ben has provided the code, you wanted Daniel.


Akash Pal Thanks but I'd recommend using Calviղ s code. It's smaller.


It's good, but I was looking for a way to make a single button toggle the counter. And have it remember the number it stopped on. I'll have to do some digging. Thank you though Akash Pal


Also, thanks to everyone who helped me.


Daniel Cooper I updated with comments.


Ben Allen (Njinx) Can you explain your code using comments? I want to be able to understand it. This is supposed to be a learning experience after all.