make google adsense work with jquery
at 2016-06-21 20: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
and if even this will not work put the ad code inside this div:
and then add this code where ever you want the ad to show up
so you can copy and past the lines below in to the head
<script type="text/javascript"> $(window).load(function(){ 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"); $("#adsense_top").remove(); $('div').live('pagehide',function(event, ui){ //Display the ad $(ads_top).appendTo("#google_ads_top div"); }); }); <script>
and if even this will not work put the ad code inside this div:
<div id="adsense_top" style="display:none;"> <!--Insert adsense Code--> </div>
and then add this code where ever you want the ad to show up
<div id="google_ads_top"> <div align="center"> </div> </div>