The menu does not even open when I click it, let alone close when it's supposed to. My code is said to be correct, but I see a red text under the preview window to the right that says "Uncaught SyntaxError: Unexpected token ."

You need to remove the semi-colon (;) on line 2, because the computer interprets a semi-colon as something that ends a statement, but you're trying to continue something. Also, the first }); needs to be removed, because it's closing $('.icon-menu').click(...); prematurely.