This question already has an answer here:
- Is there an “exists” function for jQuery? 38 answers
How do I check if an element exists if the element is created by .append()
method?
$('elemId').length
doesn't work for me.
</div>
转载于:https://stackoverflow.com/questions/4592493/check-if-element-exists-in-jquery