Issue with Interactive Website: News Reader Leason 7 The O shortcut


#1



Interactive Website: News Reader Lesson 7 The O shortcut


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();
   
   
    $(this).addClass('current');   
    $(this).children('.description').show(); 
  });  
  
  $(document).keypress(function(event) {
      if(event.which === 111) {
        $('.current').children('.description').toggle() 
      }
  });      
    
};

$(document).ready(main);


Any suggestions would be appreciated I have been stuck at this point for awhile and I would really like to finsh the section. Thank you


#2

Hi Megan,

Take a close look at line 3, and see if you can spot the problem there.


#3

i am having same problem whats missing ???


#4

@prem2000 Please create a new topic with your code, the error message you're getting, and a link to the exercise you're on so we can help you.


#5

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