7/8 Code Correct but getting error message anyways


#1


https://www.codecademy.com/courses/web-beginner-en-zmn0b/0/7?content_from=make-an-interactive-website%3Ayour-first-program#


In Making an Interactive Website: Push Menu 7/8, I wrote the code and kept getting an error message, so I finally just copied and pasted the example so I could see what changed but I am STILL getting the same error message...

The error message reads: Oops, try again. Remember to add code for $('body') inside $('.icon-close').click(). Look back at the instructions for the code.


var main=function(){
    $('.icon-menu').click(function(){
        $('.menu').animate({
            left:'0px'
            }, 200);
        });
    $('.body').animate({
        left: '285px'
        }, 200);
        
        
    $('.icon-close').click(function() {
    $('.menu').animate({
      left: "-285px"
    }, 200);
    $('body').animate({
      left: "0px"
    }, 200);
  });
};

$(document).ready(main);

As far as I can tell, the $('body') element is included inside the $('.icon-close'). The brackets match up, do they not? Please assist!

Thanks in advance!


#2

@emily.everett89,

Have a close look at

$('.body')