Stuck on the shortcut


#1

here's the way I've wrote my program
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).ready(main);
but I don't know where the problem is! thanx


#2

@habib0u,

the structure of our main-function looks like:

var main = function() {
     //BEGIN of main function-body 
    //
    //The CLICK event-handler is

    $('.article').click(function() {

     });

     //now comes the KEYPRESS event-handler

     $(document).keypress(function(event) {

       });
   //END of main function-body
   };

  $(document).ready(main);