Lite Brite Project Won't Light Up


I've gotten to step 10, and none of the written colours or boxes will light up when I click on them. I feel like I'm missing something fairly obvious! Could someone please review my code and let me know where I'm going wrong?

function main(){
  var colorClass = '';
  $('.select-color').on('click', function(){
    var selectedColor = $(this).attr('class');
    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(){


Thank you!


Please remember to include a link to the exercise so we can get to it without having to dig around, aimlessly. Thanks.



It took forever to spot the error in that line.


Thank you! That solved it


A post was split to a new topic: Lite Brite won't light up