Features :
- Highly improve general page load
- Improve cpu load of visitor in case of displaying flash banners (only displayed if necessary)
– Compatibility with AdSense and many other advertisers
- Cross Browser support (IE5.5+, Firefox, Opera, Chrome, Safari)
If you use this module, thanks to write a little coment on http://www.Web2Ajax.fr/ :)
Big thanks to Mika Tuupola for the Lazy load part
-> http://www.appelsiini.net/projects/lazyload
Another big thanks to FrankT and his document.write overload code
-> http://blog.phpbuero.de/?p=26
You can look at the HTML source to understand how to use this plugin
To download example, click here.
// This code lazy all ads decalred in div with the 'pub_container_multi' class attribute
jQuery('div.pub_container_multi').lazyLoadAd() ;
<div class="pub_container pub_container_multi" original="http://pagead2.googlesyndication.com/pagead/show_ads.js">
<code type="text/javascript"><!--
google_ad_client = "YOUR_AD_CLIENT_ID";
google_ad_slot = "YOUR_AD_SLOT";
google_ad_width = 300;
google_ad_height = 250;
//-->
</code>
</div>
<div class="pub_container pub_container_multi" original="http://www.ebuzzing.com/player_blog/player.php?parametre=115660"></div>
// General params
jQuery('div.pub_container_options').lazyLoadAd({
threshold : 200, // You can set threshold on how close to the edge ad should come before it is loaded. Default is 0 (when it is visible).
forceLoad : false, // Ad is loaded even if not visible. Default is false.
onComplete : function() { // Is the callback triggered after ad load complete. Default is false
alert('Ad is loaded') ;
}
}) ;
<div class="pub_container pub_container_multi" original="http://pagead2.googlesyndication.com/pagead/show_ads.js">
<code type="text/javascript"><!--
google_ad_client = "YOUR_AD_CLIENT_ID";
google_ad_slot = "YOUR_AD_SLOT";
google_ad_width = 728;
google_ad_height = 90;
//-->
</code>
</div>