+ 1
Why isn't the stop function working?
10 Antworten
+ 7
<!--Hello, Bithi D !
Your mistake was that you set the same functions on both buttons.
Buttons have been replaced by different functions
Please try to replace these buttons with your previous ones.
Good luck! -->
<button id="blink" onclick="blink()">Blink</button>
<button id="stop" onclick="blinka()">Stop</button>
+ 3
<button id="stop" onclick="blinka()">Stop</button>
+ 3
Here the toggle blink single button control
https://code.sololearn.com/W46JIRineQI5/?ref=app
+ 2
You could use a single toggle button by setting toggle class function
function toggleBlink() {
var bloom = document.getElementById("bloom").classList.toggle("blink");
}
+ 2
thank you for the suggestion
+ 1
You have copy paste that's why you forget to write blinka function in stop.
+ 1
function changeColor(color) {
var x = document.getElementsByClassName("cell");
var i;
for (i = 0; i < x.length; i++) {
x[i].style.backgroundColor =color;
}
}
and your color code will work with this
+ 1
thank you
+ 1
thank you
+ 1
thank you very much