Search code examples
javascriptjqueryjquery-eventspartial-page-refresh

Refresh ads after a jQuery action?


*FYI: I'm not using Adsense and this is not against my TOS...

I have pages that display jQuery slideshows. I used to create the slideshows in html and so every slide change would be a pageview. Now that I'm using Javascript for the slideshow I am only registering one ad impression for every slide viewed. I'd like to find a way to have my ads refreshed every time the reader clicks to view the next slide. Any suggestions on how to accomplish this?


Solution

  • This really depends on how you load your ad off of the ad network. But, you could put the ad code in a separate file and then do something like this each time the slide changes: $("#adspace").load('adfile.html');

    This would be a nice, generic, way of updating the ad each time the slide changes.