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

+1

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. https://code.sololearn.com/Ww3EOsdA4WdZ/?ref=app

6/11/2018 9:33:00 AM

Daniel Cooper

9 Answers

New Answer

+3

Like this? https://code.sololearn.com/WF2b9uT3CvKJ/?ref=app

+5

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. https://code.sololearn.com/Wx2K7j4sZnb8/?ref=app

+4

https://code.sololearn.com/W4p2GKviuZ9p/?ref=app

+2

Ben has provided the code, you wanted Daniel.

+2

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

+1

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

+1

Also, thanks to everyone who helped me.

+1

Daniel Cooper I updated with comments.

0

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.