Can't figure out what's wrong with my code on #7


#1

can you please help me I'm stuck too!! Thanks in advanced!:sweat:

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('o');
        }o
    });    
});

};

$(document).ready(main);


Stuck on The o shortcut (exercise 7)
#2

Hi D'onna,

The function you use there should be toggleClass(), and o isn't the name of the class you're trying to toggle.
You should also remove the o after your if statement.

If you still have trouble, please post the error message you're getting and a link to the exercise :slightly_smiling:


#3

Just get rid of your 'o' inside of your toggle method and after the bird brace on the next line and you should be golden!