I have this jQuery code:
$(this).closest('div:has(.FIND_ME)').find('.FIND_ME').hide();
But an element with class .FIND_ME not hidden in IE8 and 9.
This question is a continuation of the Search for an item with a common ancestor
HTML:
<div> <div> <span>some text</span> <div> <span id="listener1">click here</span> <span>sometext</span></div> <div> <span class="FIND_ME">Result Here</span></div> </div> <div> <span>some text</span> <div id="div1"> <div id="div2"> <span id="listener2">click here</span> <span>sometext</span></div> </div> <div> <span class="FIND_ME">Result Here</span></div> </div> </div>
source share