Can open menu fine, but when more code added to close menu, it no longer works at all


Very new to this so probably something obvious! Any help appreciated.

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

      left: "285px"
    }, 200);
  $('.icon-close').click(function() {
        left: "-285px"
    }, 200);
      left: "0px"
    }, 200);



Hi Ryan,

Can you spot the problem there?


You're missing a dot (.). That part should look like this instead:



Missing dot! I'd been staring at it for so long I couldn't see it.

Is there any method for finding missing things like that or is it simply knowing it all like the back of your hand?

Many thanks.


Mainly that it's a common mistake here on the forums, so it's one of the first things I check :smile:
As you write more and more code, you'll make fewer mistakes and get better at catching them, but they'll be harder to catch, so you might never be able to tell a difference, but you will be getting better :slightly_smiling:


Thanks for your help!

Last coding I did was on my Commodore 64 many years ago. :smile: