7. The O shortcut: It looks like the o key isn't opening a description. Remember to toggle the current article's description inside the event handler


#1

Probably just a missing {}(), or .but I've been looking for ages and can see anymore :expressionless:

Any help appreciated!

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('.description').toggle();
}
});

}
$(document).ready(main);


#2

Hey Ryan,

Your typos are getting harder to find! :smile:
Take a very close look at this:

Can you see the problem there?

Hint

You're missing a dot (.) in front of current. Like this:

$('.current')
// ↑ you're missing this


#3

:joy: Thanks again! Missing dot.

I should've realised because all the other classes have dots too. Was so intent on finding something missing that I couldn't see the obvious :stuck_out_tongue: