O button won't toggle


#1

The o button toggles but it says my code is incorrect. I have tried multiple times to rewrite and am not seeing where I am going wrong.

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

@Northwestern,
You have pasted-in your document =keypress= Eventhandler

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

into the middle of your article =click= Eventhandler

 $('.article').click(function() {
     $('.article').removeClass('current');
     $('.description').hide()
     $(this).addClass('current');
     $(this).children('.description').show();
});