7. The O short cut


#1



https://www.codecademy.com/en/courses/web-beginner-en-4hxyb/0/7?content_from=make-an-interactive-website%3Ajquery-events#

I've looked at the tip and even copied it, but still tells me that I am wrong.


Replace this line with your 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);


#2

HI you didn't close the main function

var main = function() {

}

#4

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