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
When you test like this:
opening=true;
What you are really doing is setting opening
to the value of true
. Use ==
instead.
Finally, order of operations, even if correct, can get confusing. Put parenthesis around each part of the comparison.
if (($(this).attr("id") === 'search') || (opening == true)) return false;