Auto adjust the ads height

This commit is contained in:
Jorit Tijsen
2024-04-09 10:31:12 +02:00
parent 9370b21d84
commit 26f9a71061

View File

@@ -2,6 +2,6 @@
<div style="width: 100%; font-family: Nunito,serif;font-size: 12px;font-weight: 500;line-height: 3.17;text-align: center;color: #666;">
- Advertentie -
</div>
<div id="{{$ad_sidebarId}}" style="width: 100%;height: 250px;margin: 11px auto 50px auto;background-color: #efefef;"></div>
<script type="text/javascript">ootag.queue.push(function () {ootag.defineSlot({adSlot: "{{$ad_sidebar}}",targetId: "{{$ad_sidebarId}}",filledCallback: (adslot) => { $('#' + adslot.targetId).css({backgroundColor: 'transparent'}); }});});</script>
<div id="{{$ad_sidebarId}}" style="width: 100%;height: 275px;margin: 11px auto 50px auto;background-color: #efefef;"></div>
<script type="text/javascript">ootag.queue.push(function () {ootag.defineSlot({adSlot: "{{$ad_sidebar}}",targetId: "{{$ad_sidebarId}}",filledCallback: (adslot) => { setTimeout(function(){$('#' + adslot.targetId).height($('#' + adslot.targetId).children(":first").height());}, 500);$('#' + adslot.targetId).css({backgroundColor: 'transparent'}); }});});</script>
@endif