getting the value from div

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
rashmi_k28
Forum Newbie
Posts: 1
Joined: Thu Jan 29, 2015 3:52 am

getting the value from div

Post 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>
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: getting the value from div

Post by Celauran »

Code: Select all

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