Interactive Website : 7/10 | News Reader problem


#1

I'm doing the interactive website lesson (Lesson Link : https://www.codecademy.com/pt-BR/courses/web-beginner-en-4hxyb/0/7?content_from=make-an-interactive-website%3Ajquery-events#) but i'm having some problems with it. What can i do to solve my problem? :l

The code :

var main = function() {
_ $('article').click(function();{_
_ $(this).children('.current').addClass();_
});
_ $('document').keypress(function(event) {_
_ if(event.which === 111) {_
_ $('.current').children('.description').toggle();_
_ }_
_ });_
};

$(document).ready(main);

The error message :

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.

Thanks, Jonathas Santos


#2

Please include a link to the exercise when posting a new topic. Thanks.


#3

Thanks for advertising me, i've already edited it :slight_smile:


#4

Have you solved this or are you still having problems?


#6

I stil having the problem man :frowning:


#7

.addClass() is missing a className argument. There are some missing lines of code in the click handler. Suggest go back to lessons 3, 4 and 5 and review how this handler is constructed. The code from lesson 5 is what you want in this segment.


#8

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