Home › Forums › JavaScript › Only show parent if child contains certain string › Reply To: Only show parent if child contains certain string
April 10, 2016 at 5:11 am
#240356
Participant
And a plain JS alternative in case you’re not already using jQuery and want something lightweight http://jsbin.com/yemaqorase/1/edit?html,js,output
EDIT: Sorry, I misread – I thought it was a ‘hide if empty’ rather than ‘ hide if doesn’t not contain X’. Ho hum – I’ll leave the demo in case it’s useful for other projects, or as a starting point for further adaptations by yourself :)