I want to hide an element if the span element inside a div has no text
below is sample HTML
<div class="showcase-caption" style="display: block;">
<span> If this span has no text then i need to change the display property of outer div to none</span>
</div>
I tried to do this using css but it didn't work as expected. so i think jquery can work better and handle older browser also.
In this case i need to change the inline property which is generated automatically by other script for showing image caption for image gallery.
Update: Thank you guys for your replies. I am choose 'satpal' solution as it is short & gave me exact result.