Page 1 of 1

getting the value from div

Posted: Thu Jan 29, 2015 3:58 am
by rashmi_k28
<div id="ad1">
<ins class="adsbygoogle id1" style="display:inline-block;width:728px;height:90px" data-ad-client="ca-pub-XXXXXXXXXXXXXXXX" data-ad-slot="XXXXXXXXXXXXXXXX"></ins>
<script>(adsbygoogle = window.adsbygoogle || []).push({});</script>
</div>
I have many ads on the page. Please help in getting the value of data-ad-slot which is inside <ins>

Re: getting the value from div

Posted: Thu Jan 29, 2015 6:40 am
by Celauran

Code: Select all

$('.id1').data('ad-slot');