Do something for each empty element found: $(‘*’).each(function() { if ($(this).text() == “”) { //Do Something } }); TRUE or FALSE if element is empty: var emptyTest = $(‘#myDiv’).is(‘:empty’);
Copy and paste this URL into your WordPress site to embed
Copy and paste this code into your site to embed