This forum is now read-only. Please use our new forums! Go to forums
Error in class number 7
I copied and pasted the code from the hint . Restated the class, logout and login again and it still says I’m wrong, please fix this error. Thanks
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();
}
});
Answer 5431163a282ae3abfc004c94
1 vote
Hey Roy, thanks for the respond, I still having a hard time to understand where exactly the brackets are missing :(
Popular free courses
- Free Course
Learn SQL
In this SQL course, you'll learn how to manage large datasets and analyze real data using the standard data management language.Beginner friendly,4 LessonsLanguage Fluency - Free Course
Learn JavaScript
Learn how to use JavaScript — a powerful and flexible programming language for adding website interactivity.Beginner friendly,11 LessonsLanguage Fluency - Free Course
Learn HTML
Start at the beginning by learning HTML basics — an important foundation for building and editing web pages.Beginner friendly,6 LessonsLanguage Fluency
1 comments
A closing parenthesis just before the keypress handler, and a closing right brace at the very end of your code. After that, you will still need to call the function, $(document).ready(main);