I have a responsive blog where ads are displayed in the sidebar. On mobile devices however, the sidebar is pushed to the bottom below the posts.
So what I'd like to do is move the ads from the sidebar and insert them into the post itself on mobile devices
I do this using javascript:
<div id="main">
<div id="article">
<div class="post">
<p class="intro"></p>
<p class="text"></p>
</div>
</div>
<div id="sidebar">
<div class="adbox-1"></div>
</div>
</div>
<script>
jQuery(document).ready(function(){
// AD REPOSITION
if ($(window).width() < 769) {
$('.ad-box1').insertAfter($('.intro'));
}
});
</script>
The ads are always loaded in the sidebar, but if the screen width is below 768px, they will be moved somewhere else.
I wonder if this would violate AdSense terms of service?