Lite Brite: Box and Blink not working


Hi there,

I’ve been working on the Lite-Brite project, and I’m stuck at trying to get the boxes and blink to light up.

The “select color” classes are working, and they light up when you click on them, but the boxes and blink still won’t. I’ve compared the code to the hints, and can’t find anything different. Any ideas on what I did wrong?

function main() {
  var colorClass = '';
  $('.select-color').on('click', function() {
    var selectedColor = $(this).attr('.select-color');
    switch (selectedColor) {
      case 'select-color cyan not-selected':
        colorClass = 'cyan';
      case 'select-color yellow not-selected':
        colorClass = 'yellow';
      case 'select-color magenta not-selected':
        colorClass = 'magenta';
  $('.box').on('click', function() {

  $('.toggle-blink').on('click', function() {
    if (colorClass) {
      setInterval(function() {
        $('.box.cyan, .box.yellow, .box.magenta').toggleClass('blink');
      }, 350);


Thanks in advanced!


The above should be an attribute name, not value.



That fixed it! Thank you so much!