Timeline for A "C" shape of 7 boxes that turn green on click
Current License: CC BY-SA 3.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 28, 2015 at 12:45 | comment | added | Joseph |
@WinchenzoMagnifico It's a flaw in my logic. I didn't check if the box was already selected (equivalent to your !== 'green' ). You can use indexOf to check if something is already in the array.
|
|
Dec 28, 2015 at 4:58 | comment | added | WinchenzoMagnifico | I like the advice about adding classes instead of doing inline styles with Javascript---- however I did notice in your fiddle if you click on 6 boxes and then click a box you already clicked instead of the 7th unclicked box they will start turning red--- is that intentional? | |
Dec 28, 2015 at 1:40 | vote | accept | WinchenzoMagnifico | ||
Dec 27, 2015 at 21:36 | history | edited | Joseph | CC BY-SA 3.0 |
deleted 28 characters in body
|
Dec 27, 2015 at 21:30 | history | edited | Joseph | CC BY-SA 3.0 |
added 425 characters in body
|
Dec 27, 2015 at 21:22 | history | answered | Joseph | CC BY-SA 3.0 |