"Unexpected Token" and Push Menu Won't Open


#1


var main = function() {

Number 7 of Interactive Website:Push Menu

I have an error message stating there is a "unexpected token" and the push menu won't open. It allowed me to progress form the previous lesson even though there was an error. Can any help me to identify the problem? Thanks!


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


#2

@catchycarboncollider,

var main = function() {
      $('.icon-menu').click(function() {
         $('.menu').animate({left: '0px'}, 200);
         $('body').animate({left:'285px'},200); 
       });
 }; 
//}; <== one too many
 $(document).ready(main);

#3

Thank you so much!!!! Removing the extra punctuation worked perfectly and now my menu works!


#4

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.