29th Jun 2018, 2:10 PM
B.D
B.D - avatar
10 Respostas
+ 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>
29th Jun 2018, 2:16 PM
Alexander Sokolov
Alexander Sokolov - avatar
+ 3
<button id="stop" onclick="blinka()">Stop</button>
29th Jun 2018, 2:56 PM
CalviŐČ
CalviŐČ - avatar
+ 3
Here the toggle blink single button control https://code.sololearn.com/W46JIRineQI5/?ref=app
29th Jun 2018, 3:16 PM
CalviŐČ
CalviŐČ - avatar
+ 2
You could use a single toggle button by setting toggle class function function toggleBlink() { var bloom = document.getElementById("bloom").classList.toggle("blink"); }
29th Jun 2018, 3:01 PM
CalviŐČ
CalviŐČ - avatar
+ 2
thank you for the suggestion
29th Jun 2018, 3:05 PM
B.D
B.D - avatar
+ 1
You have copy paste that's why you forget to write blinka function in stop.
29th Jun 2018, 2:24 PM
áŽ‹á”˜âżá”ƒËĄ
áŽ‹á”˜âżá”ƒËĄ - avatar
+ 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
29th Jun 2018, 2:34 PM
áŽ‹á”˜âżá”ƒËĄ
áŽ‹á”˜âżá”ƒËĄ - avatar
+ 1
thank you
29th Jun 2018, 2:55 PM
B.D
B.D - avatar
+ 1
thank you
29th Jun 2018, 2:56 PM
B.D
B.D - avatar
+ 1
thank you very much
29th Jun 2018, 3:19 PM
B.D
B.D - avatar