Answer the question
In order to leave comments, you need to log in
Why Adsense ads don't work under spoiler?
Hello, there is a simple spoiler on the site:
https://jsfiddle.net/Waksim/oax00uuj/1/?utm_source...
HTML
<div class="spo disabled">
<div class="spoh">Заголовок</div>
<div class="spob">Здесь текст и код Google AdSense</div>
</div>
/*Спойлер*/
.spo{background:#fff;margin: 0 0 8px;border:1px solid #efefef}
.spoh{background:#efefef;cursor:pointer;padding:5px;}
.spob{padding:10px}
.spo.disabled .spob{display:none}
.spo.active{border-color:#57AA43}
.spo.active .spoh{background:#57AA43;color:#fff}
<script>
jQuery(document).ready(function(){
jQuery('.spoh').click(function(){
$(this).parent().toggleClass("active").children('div.spob').toggle('normal');
})
})
</script>
Answer the question
In order to leave comments, you need to log in
When the code is loaded - the element is hidden, the code cannot show ads if the element is hidden. Advertising must be added at the time the element is expanded.
There may be no ads for this page, happened on new test pages or on new types of ads
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question