My code was accepted but my menu won't push back! Please help :)


#1

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);

#2

code-edit.pdf (249.1 KB)
Here's a picture if this helps.


#3

Hi Misschasady,

You need a dot (.) in front of both icon-close and menu, but inside the single quotes (' ') and parentheses (()) :)


#4

Got it! Thank you so much :smile:


#5

2 posts were split to a new topic: What's wrong with my code here?