Following code to check status and display hamburger menu is not working.

Following code to check status and display hamburger menu is not working.

$( document). ready( function(){
     var menustatus = 0;
     if( menustatus== 0){
         menustatus= 1;
         $( ".hamburgerMenuIcon"). click( function(){
             $( ".menu"). css( "display", "block");
        });
    };
     else{
         menustatus= 0;
         $( ".hamburgerMenuIcon"). click( function(){
             $( ".menu"). css( "display", "block");
        });
    }
});