The N shortcut 2


I keep getting the statement "Oops, try again. It looks like the n key isn't moving to the next article. Remember to remove the 'current' class from currentArticle and place it on nextArticle."

Below is the code I am using and I have no idea what to change to proceed from here.

var main= function() {
$(document).ready(main); {

$('.article').click(function() {
$(document).keypress(function(event) { 
    if(event.which === 111) {
        else if(event.which === 110) {
        var currentArticle = $('.current');
        var nextArticle =;


All/Any help is appreciated. Thank you


I apologize. I just looked, and found that I too had forgotten to close my if(event.which ===111)


This game i created for you may make you understand whats going on!! :smiley:


@amanuel2, I'm not sure how this game is supposed to help @spencedawg85 with his code.


Just to give him a concept about event.whitch(), the task he is on. I use that a lot in my JS Code of that game.


@spencedawg85 That's part of the problem, but you've also closed main() before anything else. main needs to be closed just before the last line, so your code structure should look like this:

var main = function() {
 // ...


...not like this:

var main = function() {


// ...