Interactive Website Newsreader 'The O Shortcut


Hi :slight_smile:

I've been having some trouble in getting the O shortcut to work in the Interactive Website section of the course.

Here's my code so far, any help would be much appreciated as it is doing my head in that I can't find it!

var main = function() {
$('.article').click function () {
    $('.article').removeClass ('.current');
$(document).keypress(function(event) {
     if(event.which === 111) {

Oh and I also have a SyntaxError: Unexpected Token Function.

Thanks! :smile:


Have a look at this ^


^should be something like this


Unfortunately that is not the reason the code isn't working. It is still coming up with the same errors

Thanks for your help.


Please paste in your updated code and error message


Look closely at the $(.'current') part.

You can remove the . before current, since the computer knows it's a class ( because of addClass() , means that the input in the parenthesis can only be a class)

Hope this helps!!!


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