What's wrong here?


#1

else if(event.which === 110) {
var currentArticle = $('.current');
var nextArticle = currentArticle.next();

currentArticle.removeClass('current');
nextArticle.addClass('current')
}
});
}
need help in this code because i use the hints but everytime when i do it like the hints it tells me im wrong and i dont know what is my mistakes please help. and thanks :slight_smile :wink: :slight_smile:


Need help with this code
#2

Hi Micheliewelly,

Please post your entire code (formatted), and a link to the exercise you're on so we can help you :slight_smile:
Thanks!


#3

ok here is my link Interactive Website: News Reader
and here is my code

  $(document).keypress(function(event) {

if(event.which === 111) {
$('.current').children('.description').toggle();
}
});
{(document).ready({main});
var main = function() {
$('.article').click(function() {
$('.article').removeClass('current');
$('.description').hide();
$(this).addClass('current');
$(this).children('.description)
please help thanks :smile:


#4

@micheliewelly Yikes - your code is really messed up. I think the best option would honestly be to just restart this lesson :confused:

To point out a few problems,

That needs to be inside the main function.

You can't have any curly braces ({}) on that line.

You're missing a closing single quote (') there.

Etcetera... I can help you refine your code more until it works, but I really do think you should just restart this lesson from scratch.