6/10 "o' & 'n' Keypress Eventhandlers. What am I doing wrong?


#1

Hi,

I'm stuck here, and I dont want to proceed unless I understand my mistake. I just can't get it to work. Weird part is there is no error indicating a problem with the code either... :confused:

var main = function() {
$('.article').click(function() {
$('.article').removeClass('current');
$('.description').hide();

$(this).addClass('current');
$(this).children('.description').show();

});

$(document).keypress(function(event) {
});
}
$(document).ready(main);


#2

Hi Sourpatchjunkie,

If there's no error, why do you feel like it's not working?


#3

Because its not functional. The O and N keys are not working.


#4

@sourpatchjunkie

  1. Sorry for the slow reply :confused:
  2. You'll be getting to making keyboard shortcuts work in the next three exercises. 6/10 is just helping you get ready for the next exercises :slightly_smiling: