How do we hide sibling div h2 using jquery -
<div> <div> <h2>referral schedules</h2> </div> <div> <script="javascript"> </script> <iframe width="100%" height="100" frameborder="0" src="www.google.com"> </div> </div>
i have page in have control on portion of html, ie div have iframe. need way hide h2 tag.
$('div > div > h2').hide();
prodably best way it.
but why, really. why? use class.
if me id'e special this
<div> <div> <h2 class="heading-sibling">referral schedules</h2> </div> <div> <script="javascript"> $(function(){ $('.heading-sibling').hide(); }); </script> <iframe width="100%" height="100" frameborder="0" src="www.google.com"></iframe> </div> </div>
Comments
Post a Comment