Wireless Army
This is a blog / tips and tricks website for web developers and security researchers.
follow us in feedly

make google adsense work with jquery
by admin
 at 2016-06-21 16:12:00.

If you have worked with jquery and google adsense at the same time you have found out that adds will not show up.
so you can copy and past the lines below in to the head
<script type="text/javascript">
   var ads_top = $("#adsense_top").find("iframe");
   //This is where the ads will show when the page is first loaded
   $(ads_top).appendTo("#google_ads_top div");


   $('div').live('pagehide',function(event, ui){
      //Display the ad
     $(ads_top).appendTo("#google_ads_top div");

and if even this will not work put the ad code inside this div:
<div id="adsense_top" style="display:none;">
    <!--Insert adsense Code-->

and then add this code where ever you want the ad to show up
<div id="google_ads_top">
        <div align="center">