javascript - Java Script shortcut error -


trying course on codeacademy. code supposed trigger article open when o-key (111) pressed. i'm told that,

"uncaught syntaxerror: unexpected token }"

here code, able offer advice?

var main = function() {  $('article').click(function() {          $('article').removeclass('current');          $('description').hide();          $(this).addclass('current');          $('article').click(function() {          $(this).children('.description').show(              });      $(document).keypress(function(event) {          if(event.which === 111) {              $('.current').children('.description').toggle();          }      });      $(document).ready(main); 

i told that: "it looks o key isn't opening description. remember toggle current article's description inside event handler. @ instructions code." thanks

you missing )

    var main = function() {      $('article').click(function() {      $('article').removeclass('current');      $('description').hide();      $(this).addclass('current');      $('article').click(function() {      $(this).children('.description').show(); // missed ) here          });  $(document).keypress(function(event) {      if(event.which === 111) {          $('.current').children('.description').toggle();      }  });  $(document).ready(main); 

Comments