Stuck on 7/10


#1



I keep getting "Uncaught SyntaxError: Unexpected Token (
I'm not sure what I'm missing, but I've looked this thing up and down and struggled to find what's wrong for about an hour.


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

HI this line

 $('.current').children('.description).toggle();

you didn't close the string with ' to ('.descrption')


#3

Hmm, this is strange. I closed that string just like you said, but it's still telling me I have an extra ) somewhere


#4

I figured it out! there was a { where there should be a } !! lmao I don't know how to close this, but I figured it out :slight_smile:


#5

2 posts were split to a new topic: I keep getting that "o" does not open the article


#6

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