7. The O Shortcut Help


#1

$('.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();

      }

});


#2

Hmm, I'm not sure I understand the problem, could you elaborate a little more? Maybe post the error code you're getting?


#3

Do you have all of the above code inside your main() function (with a closing } at the end)? Also make sure that you click somewhere on the preview pane before trying "o" so that the document has focus.


#4

A post was split to a new topic: Need help on exercise 7