Need help finding the syntax error


#1

Hello, could someone help me, because i'm stuck here. Syntax error but i really cant find it.

var main = function() {
  $('.article').click(function() {
      $('.article'.removeClass('current'); $('.description').hide();

        $(this).addclass('current'); 
        $(this).children('.description').show();
      });

    $(document).keypress(function(event) {
      if (event.which === 111) {
        $('.current').children('.decription').toggle();
      }
    });

  });



$(document).ready(main);

7. The o shortcut Interactive Website: News Reader
#2

Hi Paoad,

Please post a link to the exercise you're on.

addclass

There's no such function - you need to change it to be camelCased, like this: addClass.

  });

$(document).ready(main);

The first line shown there ↑ has an extra closing parenthesis ()) on it, you need to remove it.


#3

Solved. Thanx a lot for helping me fing the misake :slight_smile:


#4

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.