3. Show a Description - I don't know what is wrong!


#1

I entered this code on lesson 3, and it looks correct:

var main = function() {
$(document).ready(main);
$('.article').click(function() {
$(this).children('.description').show();
});
};

but when I click the articles they don't show, and when I click "Save and Submit" this error message comes up:

Oops, try again. It looks like the current article's description didn't show when clicked. Remember to add code for $(this).children(); inside the event handler. Look back at the instructions for the code.

Is there something wrong with my code or is it a bug? Help!


#2

Hi Super,

You need to move this line:

out of your main function, so that you're not calling the function from inside of itself.


#3

Thank you! :smile: That solved the problem.