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
.filled-text
#
Use the children funcion of jQuery.
$("#text-field").keydown(function(event) { if($('#popup').children('p.filled-text').length > 0) { console.log("Found"); } });
$.children('').length will return the count of child elements which match the selector.
$.children('').length