Adding JavaScript for dynamic menu (mobile)