Need help on exercise 7


#1

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')toggleClass();
}
});
};

$(document).ready(main);

I followed this conversation and came up wiht this. Am I missing something?


Stuck on The o shortcut (exercise 7)
#2

Hi Arod1992,

Your addClass(), removeClass(), and toggleClass() functions need a dot (.) before them, but there shouldn't be a dot inside the parenthesis:

                     // ↓ no dot, and this shouldn't be empty
$('.article').addClass('current');
          // ↑ you're missing the dot on all three functions