Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Only show parent if child contains certain string Reply To: Only show parent if child contains certain string

#240356
Beverleyh
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 :)