I read this, this and this, but I think my situation is different. I don\'t need to refresh Ads everytime I make an AJAX call.
I have a page call it \"mypage.php\".
The default google adsense code is something like this:
Spit the code up into 3 parts to make it work on ajax loaded content.
Include the google script somewhere in your page (in your
for example) just once.
Place the google code in your (ajax) content wherever you want the banner(s)
Trigger this function after your content has changed via ajax. (don't forget to trigger this on page load too, to display ads when pages isn't loaded via ajax.)
function displayGoogleAds(){
$('ins').each(function(){
(adsbygoogle = window.adsbygoogle || []).push({});
});
}
Ps. I'm not sure if google will allow this, since your modifying/changing up the code a little bit. But i'm currently using it this way.