Can't make multiple if conditions in JavaScript?

前端 未结 6 674
一整个雨季
一整个雨季 2021-01-28 23:15

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         


        
6条回答
  •  無奈伤痛
    2021-01-28 23:41

    My guess is that === does not exist. == is for testing equality

    so if ($(this).attr("id") === 'search' || opening == true) return false; should be if ($(this).attr("id") == 'search' || opening == true) return false;

提交回复
热议问题