7. The "O" Shortcut


#1

Hi! I have been working on the "O" shortcut for 3 months now and I still haven't been able to fine my mistake.
Here it is:

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

Hello @amy990322,

Can you please attach a link to the course in question? Thanks!


#3

HI this part

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

you closed you function like that )}; instead of });

});


#4

A post was split to a new topic: 7. the "O" shortcut


#5

A post was merged into an existing topic: 7. the "O" shortcut