I am using the following script to find all h1 elements, within a parent ID container that will fit a curtain criteria...
$(\'#cpcompheader h1\').html(\"&nbs
I guess you could do something like:
$('h1:contains( )');
or if you want the exact match:
$('h1').filter(function(index) { return $(this).text() === " "; });
you could also look at the contains selector documentation: https://api.jquery.com/contains-selector/