The O Shortcut


#1

Hey I'm having problems with my code. It keeps telling me it looks like the o isn't opening a description. Below is my code. Can you please tell me what I am doing wrong. Thanks

var main = function() {
$('.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();
}
});
}
$(document).keypress(function(even) {
$(document).ready(main);

#2

Hi Jj,

Delete line 1 shown.


#3

Awesome thank you so much that worked!