I have checked these:
- jQuery append Google Adsense to div
- How to hide div when containing a Google adsense advert?
- How can I place an Adsense ad in each hidden JQuery div without exceeding their 3 ad limit
I need a javascript or jQuery script to hide div which contain adsense ads. I have searched more in google and tested all the script is working fine for image and text but not working for adsense ads.
What I have noticed is that when I write a code like this :
<div id="stackoverflow">
adsense code
</div>
It automatic converted into :
<div id="stackoverflow">
<div id="adunit> <!-- adunit id for text ads --> <!-- google_image_div id for image ads --> <!-- some time it create diff id also for div -->
some code
</div>
<iframe>
some code
</iframe>
</div>
Can anyone help me with code?