I have absolutely no idea why this is not working. Makes no sense to me.
This returns a \"syntax error: parse error\":
if ($(this).attr(\"id\") === \'se
You have an error in your condition
if ($(this).attr("id") === 'search' || opening = true) return false;
should be
if ($(this).attr("id") === 'search' || opening == true) return false;
the problem is with the equals sign
=
is different to ==
the first one is the assignment operator. the second one is for comparison