Let's say that I define an element
$foo = $('#foo');
and then I call
$foo.remove()
from some event. My question is, how do I check whether $foo has been removed from the DOM or not? I've found that $foo.is(':hidden')
works, but that would of course also return true if I merely called $foo.hide()
.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…