The o shortcut


Link to exercise

I know this exercise has been posted over and over again, I read the solutions posted but it is still not working.
I'm not sure what I am missing here...

Error messages:
* Uncaught SyntaxError: Unexpected token )

  • Oops, try again. 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.

var main = function(){
$(document).keypress(function)(event) {
    if(event.which === 111) {



I had the exact same problem. I did exactly what the instructions said, but NOTHING worked! Please help!


Okay, @neededausername and @melnyx.

So, this

should be current ('current') and not a current class ('.current'). You are already using the inbuilt function removeClass

I hope this helps! :slight_smile:


    if(event.which === 111) {

try it . hope U can find the diffrent.


This doesn't do anything. Can you send a screenshot of what the code should
look like?

Anna Rosner
Student, Sutherland Middle School

*"The Secret of change is to focus all of your energy, not on fighting the
old, but on building the new."*



Also, here.

Your event should be in the function. You closed the function there. Remove the bracket closing the function immediately.

Cc: @melnyx

@neededausername , please post your own code.

Thank you. :slight_smile:


Actually I did try changing it to ('current') before and wasn't working. However hackjane and you spotted the solution somewhere else:

Totally worked so, thanks a lot!!


Thanks a lot!, after a good night sleep, I can see it now :smiley:


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