7/10 The O Shortcut


Have been looking at differnt solutions for this and can't seem to figure out my error. Codeacademy returns the error " It looks like the o key isn't opening a description......". Here is my code, please can anyone help.

var main =function(){
// Select all other articles using the 'article' class and remove the class 'current' from them using .removeClass(). 
// Select the current article using this. Add the class 'current' to it using .addClass().
    }); // end click function

// Create a keypress event handler
    if (event.which === 111){
    } //end if
    }); // end keypress function
}; //end main


A post was split to a new topic: 7/10 The O shortcut, can't pass exercise


Hi Andrew,

Can you see the problem there?


You need a dot (.) right in front of description, but still inside the single quotes (' ') and parenthesis (()), like this:

$('.description') //...


Thanks so much for for the assistance. These dots are tricky. I added one to* $('.description').hide();* and to
$('.current').children('.description').toggle();. It now lets me pass the exercise and I can use the o key o toggle an article into and out of view.


@scriptpro91844 My bad, I missed something else. You've got the same problem with $('current'); it needs a dot (.) right in front of current, and then I think your code should work :)


A post was split to a new topic: Exercise 7, the O shortcut - can't pass exercise


thankx guys I was stuck at same .....


This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.