1. Solution: judge according to the length of the obtained element
2. Examples:
if($("#content").length>0){ //do something }
3. Illegal spelling
if($("#content")){ //do something }
1. Solution: judge according to the length of the obtained element
2. Examples:
if($("#content").length>0){ //do something }
3. Illegal spelling
if($("#content")){ //do something }