开发者

Refresh ads after a jQuery action?

开发者 https://www.devze.com 2023-01-09 09:55 出处:网络
*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 tha

*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 onl开发者_如何转开发y 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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号