The o shortcut


#1



I don't understand what i did incorrectly ? any help would be awesome

It looks like the o key isn't opening a description. Remember to toggle the current article's description inside the event handler. Look back at the instructions for the code.


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


#2

HI this line

$(document).ready(main);

should be at the end of your code ...then this part

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

should be inside the main function... Can you post all your code?


#3

here is the full code
var main = function.click(handler) {
$('.description').hide();
$('.article').click(function()
{
$(this).children(',description').show();
};


.addClass($(this).children('.description').show()

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


#4

hi so I tried that and it still didn't work


#5

it's missing a lot of part of code from the previous Lessons at this point I recommend you to restart the lesson and then follow and read well the instruction.