The 'O' shortcut


#1



I keep getting this message and I don't know what to do!
Oops, try again. It looks like the o key isn't opening a description. Remember to toggle the current article's description inside the event handler. Look back at the instructions for the code.


var main = function() {
    $('.article').click(function() {
        $('.article').removeClass('current');
        $('.description').hide();
        
        $('.description').addClass('current');
        $(this).children('.description').show();
    });
    
    $(document).keypress(function(event) {
        if(event.which === 111) {
            $('.current').children('.description').toggle();
        }
    });
    
<div class="article">
  <div class="item">
    ...
  </div>

  <div class="description">
    ...
  </div>
</div>


#2

@livelovespin,

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);