Google adsense loading multiple banners randomly

Posted on 2012-09-20
Last Modified: 2012-09-25
Is it possible to load Google Adsense code in a DIV using jQUERY.  The reason for this is random banners appear on a page.  Here is some sample Google banner code. I know you can have only 3 banners per page.  I just want to randomly place the divs on the pag

<!-- Start Here -->

<script type="text/javascript"><!--
google_ad_client = "pub-2151667935419035";
/* 234x60, created 7/17/08 */
google_ad_slot = "7918239589";
google_ad_width = 234;
google_ad_height = 60;
<script type="text/javascript"

<!-- End Here --> 

Open in new window

Question by:stargateatlantis
    LVL 81

    Expert Comment

    check this :

    so just create three containers instead one where you put each script

    Author Comment

    hiding the banner violates google Terms of service any other ideas
    LVL 81

    Expert Comment

    if you're page is very long and you have the banner at the very bottom, so the user can't see it before using the scrollbar, do you violate the terms of service?

    Author Comment

    it does violate their tos there has to b a smart solution
    LVL 81

    Accepted Solution

    >it does violate their tos
    Why? It's common to see banner at bottom

    In this case, your question itself violate it too.
    Assuming to move, we need to remove so hide... append to is remove, move.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    In this article you'll learn how to use Ajax calls within your CodeIgniter application. To explain this, I'll illustrate how to implement a simple contact form to allow visitors to send you an email through your web site.
    JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
    The viewer will learn how to dynamically set the form action using jQuery.
    The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now