I have a div as below that i need to hide the specific div based on the inner text clause.
<div>first div <div>second div <div>third div <div style="position: absolute; padding: 2px; top: 0px; left: 1px; color: white;">XXX</div>/div>/div>/div>
Try this:
$('div:contains("XXX")').hide().parents('div').show();
// hides the div which holds the word 'XXX' and shows the parent