Interactive Website: News Reader Keyboard Shortcuts


#1

var main = function() {
    $('.article').click(function); {
         $('article').removeClass('current');
        $('.description').hide();
    $(this).addClass('current');
        $(this).children('.description').show();
        $(document).keypress(function(event) {

});
}    


$(document).ready(main);

I receive the following error: "Expected '(' "


#2

Hi Clarence,

Immediately after the function keyword, you need two parenthesis: an opening one ((), and a closing one ()). Like this:

function() {
  // ...
}

After you fix that (on line 2), you also need to remove the semi-colon after the parentheses there, and your code should work :slightly_smiling: