I am using google adsense responsive ads. Sometimes adsense don't find ant ad and leave blank space. Is there a way, using a javascript to determine if an adsense block is empty? and than i will hide the entire adsense container.
Here is the code i've been using for the adsense:
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Sidebar skyscrapper -->
<ins class="adsbygoogle"
style="display: block; width: 300px; height: 600px"
data-ad-client="ca-pub-xxxxxx"
data-ad-slot="xxxxxx"
data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Sidebar skyscrapper -->
<ins class="adsbygoogle"
style="display: block; width: 300px; height: 600px"
data-ad-client="ca-pub-xxxxxx"
data-ad-slot="xxxxxx"
data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>