For example, if you add an element with .append(), how do you check if this element exists? `$('elemId').I did it with length, but it doesn't work.
javascript jquery
You have to put # in front of the id.
$('#elemId').length
---^
Like this.
You can check the existence of the element as below. We support you all.
null undefined NaN empty string ("") 0 false
if($("#lemId")){ // }
© 2024 OneMinuteCode. All rights reserved.