I have a div #popup
that is dynamically filled with several paragraphs with the class .filled-text
. I'm trying to get jQuery to tell me if #popup
has one of these paragraphs in it.
I have this code:
$("#text-field").keydown(function(event) {
if($('#popup').has('p.filled-text')) {
console.log("Found");
}
});
Any suggestions?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…