
jQuery LazyLoad Ad plugin has been updated and version is now 1.4.
Improved on a lot of features, plugin is more strong and have now the capacity to chain script loading.
For this new version, I’ve build a mini site (jqueryad.web2ajax.fr) focused on this plugin. You’ll find a presentation of the plugin, some demos, how to implement it in your own blog or website and download links.
Some people ask me a new feature that is Lazyload for images too. I hope it could be implemented in the next version 1.5 soon.
For moment, this plugin was successfully tested on adSense, OpenX tags, BlogBang and GoViral platforms.
Let me your feedbacks !





parece que no funciona
25 août 2012 21:02
This is not valid HTML5:
- Attribute original not allowed
- Attribute type not allowed
9 juin 2012 09:38
This is my first time pay a visit at here and i am genuinely impressed to read
everthing at one place.
12 mai 2012 01:13
I cannot make it work (just load script) use this:
div class="lazyload_ad" original="http://media.reformal.ru/widgets/v3/reformal.js"> /div
27 avril 2012 03:27
I use it with OpenX:
<code><!--//<![CDATA[
var m3_u = (location.protocol=='https:'?'https://banner.voi.su/www/delivery/ajs.php':'http://banner.voi.su/www/delivery/ajs.php');
var m3_r = Math.floor(Math.random()*99999999999);
if (!document.MAX_used) document.MAX_used = ',';
document.write ("");
//]]>--></code>
and call in my main.js after page was loaded:
$(function(){
$('.lookatthis').lazyLoadAd();
});
It works, but I cannot make it work (just load script) use this:
27 avril 2012 03:25
Hello, your adsense doesn't show on this page, i can only see the other two providers.
Why? have you banned from adsense because you are using this script?
11 avril 2012 03:10
After trying different options for 3 days I finally found this that works in IE7 with JQuery 1.7.1 and JQueryMobile 1.1.0-rc.
Thanks a lot for it.
19 mars 2012 06:22
This does not appear to be working for rich media ads retrieved from an ad-serving network. I get script text output to the page at best in FF and errors in IE, especially with ad scripts that contain document.write() several levels deep, such as:
Document.write(‘document.write(“[script tag plus src attr[” + “[close script tag]”);’);
Any resolution/work-around known?
12 mars 2012 17:31
This does not appear to be working for rich media ads retrieved from an ad-serving network. I get script text output to the page at best in FF and errors in IE, especially with ad scripts that contain document.write() several levels deep, such as:
Document.write(‘document.write(“” + “”);’);
Any resolution/work-around known?
12 mars 2012 17:27
This plugin doesn't alter any of AdSense's JavaScript code that is called, only in how the calling code is formatted on the web page. It's reformatted for delayed calling, but it's really being called just the same as before. If AdSense is against this, then they would also have to be against using their code in ad servers in general, where the code that's placed on your web pages won't look like AdSense's calling code.
I've been using this for months with no problem from AdSense.
1 mars 2012 00:40
is this against google adsense's policies? I read extensively that you are not allowed to alter their code. I want to implement this, but also do no want to get banned from adsense.
1 mars 2012 00:03
Hi. Well done job.
I'm having the same issue where ads display in the wrong locations.
Is there any body that's working on that problem?
Thanks in advance, roger
20 février 2012 15:46
Has anyone looked at the issue where ads display in the wrong locations? I still see this from time to time.
5 janvier 2012 13:48
Doesn't work, adsense no 1 and no 2 don't appear.
15 décembre 2011 04:07
I can't see Google Adsense No 1 and 2 on your demo. Tested with all browsers. No problems on other websites.
regards,
Marc
13 novembre 2011 21:54
I think Racer left a message for me earlier.
Racer, if you can't see my site, then likely you are blocked for some reason. Please follow the link on the blocking response, and you'll see an e-mail address. Please send a cut/paste of the blocking response (first page), and I'll release the block for you.
Thanks!
11 novembre 2011 22:03
here is the solution i found (see http://91.121.10.15/adsense2_ok.htm) for internet explorer 6
8 novembre 2011 19:21
hello. i've got an error with IE6 on http://91.121.10.15/adsense2.htm
it says
Line: 40
Char: 108
Error: Expected '}'
Code: 0
can you help me please ?
8 novembre 2011 17:02
I've figured out workarounds to some issues I've been having...
1) To nearly eliminate the problem of ads bunching up in one spot, I doubled the default timeout to 3000.
2) The problem with an ad not displaying if I reload at a spot in the middle of the page was more difficult to figure out. First, it was the 4th of 4 ads in the HTML, even though it was in the middle display-wise (it's in a sidebar that's defined last). Second, it appears that my OpenX ad server wasn't even being called by the lazy loader to fill the ad spot. Third, if I scroll away and back, it only loads the ad if had scrolled to another ad spot where that ad loads first. My workaround was to assign this ad spot's div a different class, and call Lazy Loader a second time using that class. Now, the ad displays as expected in this scenario.
8 novembre 2011 15:21
Hi
great job. I want to know if i MUST use <code> in order to put values into google_ad_client (and the other ones) if these variables have already been specified into my html code .
thx
8 novembre 2011 13:21
Disregard the last function -- it didn't get all pasted correctly. Instead, look for the functions Javascript on the page and look at the last function in the file. It's minified, but it shouldn't be much work to clean it up. Don't use the line that refers to setting a forum variable.
4 novembre 2011 19:09
Racer, I'm using it on my discussion board Louisville History & Issues - http://www.metroissues.com/louisville/
However, I didn't code it exactly the same way as in the example.
I placed my OpenX code (rewritten for this purpose) into my site's main JavaScript functions, and call it using loadCommOxZone(n), where n is the zone ID. You can see in the page source how I placed the ads.
Here's the loadCommOxZone function, unminified and taking out my site-specific variable. Also replace {your_ad_server_domain}.
function loadCommOxZone(ox_zone) {
var m3_u = 'http://{your_ad_server_domain}/www/delivery/ajs.php';
var m3_r = Math.floor(Math.random()*99999999999);
if (!document.MAX_used) document.MAX_used = ',';
document.write("");
}
4 novembre 2011 19:05
Can somebody show me an example (or a live demo of any internet site) how to use openx code with this please?
Can't find a solution. Openx is quite different than the code given here.
Thanks
4 novembre 2011 17:44
There is a Drupal integration module available: http://drupal.org/project/lazyloadad
4 novembre 2011 14:37
it is not possiible for youtube Videos :-((
http://www.truthdepot.de/
3 novembre 2011 18:32
hello,
I have a problem with lazyLoad of Safari5 with Windows7.
you could check?
thanks waiting for your response.
Ps. a library really useful
3 novembre 2011 16:57
I'm also now occasionally seeing ads bunch up in a spot where they don't belong. Most of the time, LazyLoadAd works flawlessly, but it would be nice to have a fix to this and the previous issue I noted.
Thanks for a great plugin!
31 octobre 2011 15:37
Agha, I'm using LazyLoad Ad with OpenX on one of my sites now. It works nearly flawlessly.
This likely has nothing to do with OpenX, but if I reload at a particular spot in the middle of a page that is supposed to display an ad, the ad won't display until I scroll away and come back.
29 octobre 2011 01:50
Does this work with OpenX?
21 octobre 2011 22:43
Well, just founded a solution for the mootools-core.js conflict. It appears that binding using the "load" event creates a conflict - just rename it to "kload" and it will work
25 août 2011 17:27
For some reason, the plugin fails to work with Mootools (try adding mootools-core.js).
With out the mootools it works pefect
24 août 2011 19:28
When I inspect the DOM, I notice that there may be empty divs inside the wrapAd div, which may skew the layout. Anyway of fixing this?
23 août 2011 02:14
This is a great tool, works great for me. I'm using the tool for rendering Google AdSence and have one question - how will I know if google adsence serve the PSA ads or ads relevant for my site?
14 juin 2011 18:26
I can't see the Google ads on your demo page. Other ads work. tested with Safari and Firefox on Mac.
10 juin 2011 10:04
Hey, this component worked great for me. It's just awesome, it saved me a lot of time. Thanks a lot!
16 mai 2011 14:38
Je m'excuse, mais cela ne me convient pas.
11 mai 2011 09:52
i just can't see the effect!!!
28 avril 2011 08:53
Hi,
I have been trying to integrate this script into our site but have come across a bit of a problem. The script loads and comes back with a with an empty body (but with margin and background transparency set). I've also noticed that you are having exactly the same problem on this demo page. Any ideas?
I've been testing on Mac safari/FF — could this be a cross browser issue?
Cheers,
Ad
25 mars 2011 15:13
HI,
When loading a page via a narrowband connection, all banners are loaded to the same banner space. is this problem solved?
thx
23 mars 2011 14:12
I'll have to try it out and I'll let you know.
thank you,
Marc
11 mars 2011 00:52
Hi Marc,
Is the display:none executed in onComplete callback the solution of non-blocking ?
PS: I deleted your mail from last message
10 mars 2011 23:06
Bjorn - I found a very interesting and simple solution to the issue. Email me @ ----------@tvguide.com and I'll tell you about it.
10 mars 2011 20:49
I have exactly the same issue as you have Marc. I'd like to know more about a solution!
Cheers,
Bjorn
10 mars 2011 13:06
Hi - I implemented this for our site and it works well for the Google ad sense ads, however, we are having issues with the double click dart ads that we have on the site. The script appears to work when it loads as the ads come in asynchronously, however, the lazy-load script causes Chrome and IE to get locked when clicking on any of the links on the page. I really like this implementation, would appreciate some help with this.
Thank you,
Marc Nash
Senior Web Application Developer
TV Guide
10 mars 2011 13:03
Hi Mintmind : never tested it, but I think it can work if you call swfobject as lazy script to load.
9 mars 2011 11:04
does it lazyload embedded youtube videos as well?
9 mars 2011 07:33
Ok, I loaded jQuery after the last Mootools use. That did the trick.
4 mars 2011 12:51
Hello, this script works as promised on it's own, but I'm experiencing problems since I've to use it on a a page side by side with Mootools: i get errors as
$(script).remove is not a function
because the browser uses "$" as Mootools, not jquery.
Is there a way to fix this? Using the extended "jquery('name')." syntax maybe?
Thanks for your help
4 mars 2011 11:51
Hello again,
I insall Jquery with No-Conflict to my Joomla,
What I found after I install LazyLoadAD is:
When I insert the code to any of Joomla component like:
Content, Banner, Custome Module, etc...
The code:
<code><!--
google_ad_client = "XXXXXX";
google_ad_slot = "XXXXX";
google_ad_width = 468;
google_ad_height = 60;
</code>
Some thing change it to be like this:
<code>
</code>
and all the rest is deleted.
Can some one help me?
its really need it.
19 février 2011 16:05
Can some one help me installing this great plugin to Joomla?
I nstall both jQuery.js & LazyLoadAd.js
I would like to know how to make my Joomla Banner Module accept this code!!!!
Please note:
1- Even in joomla Aricle the code is not workign.
2- the code also not work in Banner Module.
I hope some one can help.
Best Regards,
14 février 2011 18:44
Oops, hit submit too quickly! Trying again.
Thanks Ian, I've tried separate calls for each advert but they still end up the same. I've resorted to just loading the adverts without lazyloadad for the moment.
30 janvier 2011 00:49
Ian - I've tried separate
30 janvier 2011 00:48
Thanks for your comment Ian. After a while a realized that increasing the timeout fixed the proble. But that also meant that everything loaded far too slow (I have about 8 ads). It wasn't only OpenX that caused the problem. I got the same result with other JS-based ads.
I tried calling the script several times instead $("div.lazyload_ad1").lazyLoadAd, $("div.lazyload_ad2").lazyLoadAd but that didn't help. I did not manage to use an id selector. Could you please give an example of what the DIV should look like in your example?
30 janvier 2011 00:44
Tom/Jens -- Have you tried loading using a specific id selector?
EG: $("#ad1").lazyLoadAd(); $("#ad2").lazyLoadAd();
Also are you loading OpenX through JavaScript or iFrames?
I also use options:
<code>
if ($("#m-left div.lazyload_ad").length) {
$("#m-left div.lazyload_ad").lazyLoadAd({
threshold : 500,
forceLoad : true
});
}
</code>
29 janvier 2011 23:49
Thank you veri much :) , Very usefull for my blog, now my site http://www.esc-creation.com loading very faster after Use this jquery ads, In next maybe u can build for Iframe . I wait for it :)
29 janvier 2011 19:17
Tom/Etienne: Just wonder if anyone have found a solution for loading multiple OpenX-ads. Mine sometimes also ends up in the same block.
29 janvier 2011 13:43
Hello,
i just send you a E-Mail to delarue..... at gmail.com with an error of lazyload ad.
It would be very nice when you can fix this error. Your development is great!
Kai
24 janvier 2011 14:51
Loading multiple adverts (OpenX) doesn't seem to work with a low delay. If a second advert starts loading before the first finishes then the code for both adverts ends up being inserted into the same block element. Is there a way around this?
I have 10 adverts to load on one page and they're all clashing with each other.
I suspect the self.find('.wrapAd') is just finding the most recent div and is appending the content there rather than in the original element.
Any ideas?
13 janvier 2011 19:30
What I forgot, ads that expand or show a popup on load do not work properly either.
12 janvier 2011 16:43
Hi,
Very nice that you wrote a plugin to fix the banner issues a lot of site know they have.
We use a dq&a (doubleclick) implementation on our site. But unfortunally, it does not seem to work properly.
It seems that some object is placed outside a div while it should be inside a div.
Of course I have some examples.
You can see and compare them.
For the lazyloading example I created seperate js-files which contains the code from the banner agency. Is that the problem? It seems to work fairly nice though and I would hate not to be able to use this plugin.
Cheers
12 janvier 2011 15:12
post removed my tags...
-div class="lazyload_ad" original="/shared/js/openx-emg-wideskyscraper.js"-
-/div-
and remove the *script/script/noscript//noscript* tags.
7 janvier 2011 23:49
I was able to get this working with OpenX
Place in your HTML:
Create a file "/js/openx-wideskyscraper.js" and paste your invocation javascript code.
You will have to remove the tags. I didn't test with noscript and can't really be bothered to get the noscript working.
At the end of your document, or anywhere else really,
// -- Load Lazy Advertisement placement as deferred
$(document).ready(function() {
$("div.lazyload_ad").lazyLoadAd();
});
Good luck!
7 janvier 2011 23:46
Hi. Thanks for your wonderful plugin.
Is it possible to use your plugin to load social bookmarking (StumbleUpon, Google Buzz, Digg, Facebook, AddThis, etc) buttons asynchronously for a blog? Right now, people have to wait until bookmarking buttons are fetched from their servers and being rendered and then they'll be able to read an article. I'd like the user to be able to read my blog as the social bookmarking buttons are being rendered.
Thank you again.
1 janvier 2011 04:15
Hi, thanks for the time you took in creating this script. Well done!!
I am using 3 google ads widgets on my homepage and when I integrate your script, it works fine 50% of the time but rest of the time, I get the following error for all the 3 ads:
Exception when calling callback: open : TypeError: a is null
https://ssl.gstatic.com/gb/js/gcm_66a225a4a9849ebff5b9f77536ce7311.js
Line 141
16 décembre 2010 09:09
@Etienne : do you have any live example or screenshot to show to me ?
11 décembre 2010 14:43
@Fabien : dommage, pour le retour de version. Est-ce que tu as pu avoir plus de détails sur ce qui buggé ou pas en v1.4 ?
Pour le contournage des ad-blocks, je sais que celui que j'utilise sous chrome parse constamment le page, donc même si tu affiches une pub 10 secondes après la fin de chargement, il va te la virer.
11 décembre 2010 14:42
@Tanc : I've still have to fix level3 of js calling ( a script js write <script> tag wich called another js file, with write another <script> tag... )
A fix can be to load swfobject.js in your body before running lazyad.
11 décembre 2010 14:35
I've run out of ideas. The ads load randomly into other ad containers. Any help or ideas with this???
10 décembre 2010 15:26
Hi, your script works quite nicely except when loading a script which writes a Flash object. The flash only seems to load or play once the user has scrolled the page down (even 1 pixel) then back up. Any ideas?
10 décembre 2010 07:59
The ads mostly load in incorrect positions. Why would this be? I'm forcing ads to load even if the are not visible...
9 décembre 2010 17:32
J'y pense... le scripte ne pourrait il pas etre détourné pour contourner les plugins de type AdBlock ???
8 décembre 2010 21:29
J'ai du retrograder à la version 1.2 car shockwave plantait complètement sur certaines pages :(
8 décembre 2010 20:51
Hello, oui tu peux sans problème, j'ai même depuis qq temps un article en stock sur ton script à publier ;)
Sinon j'ai qq retours à ce sujet :
1/ Je détourne ton script pour l'utiliser de la façon classique aussi pour les images, et des scripts externes PHP et JS non publicitaires :P et ça marche très bien
2/ Qd j'affiche 2 pubs différentes d'une même régie, je dois désactiver le lazyload sur l'une des 2 sinon par moment les 2 pubs apparaissaient dans la même zone par erreur à l'écran (pas boooo)
3/ Depuis que j'ai désactivé le LazyLoad sur les Adsense mon revenu à triplé alors que le trafic est le même, donc si ca marche nickel à l'affichage, il semble que ca perturberait le tracking Google :-S
4/ Depuis cet aprem ou j'ai fait la mise à jour vers la derniere version du script, ca plantouille à mort avec mes autres scripts JQuery :-S C'est peut etre aussi du a des modifs que je viens de faire sur le .htaccess au niveau des "expire headers". J'attends demain pour voir d'ou ca vient :S
Voili voilou !
7 décembre 2010 03:20
Fabien : je viens de regarder pix-geeks et c'est pas mal du tout l'implémentation du lazyload !
Je peux citer ton blog sur jqueryad.web2ajax.fr ?
Bye.
7 décembre 2010 00:58
Hihi, non pas de triche de ce côté là :) j'ai juste tout réécrit de a à z par rapport a la dernière version.
6 décembre 2010 20:53
Ca va carrément plus vite !
C'en est même suspect... tu as figé certains réglages par défaut ?
6 décembre 2010 19:12
Hello Ego,
Can you use a service like 'http://pastebin.com' to share the code please, because what i've is not really full I think :)
Thanks/
4 décembre 2010 19:34
Sorry for the code. I thought you had enable some pasting code system...
1 décembre 2010 19:57
Thanks Guillaume for your answer. And thanks for the plugin. It's a wonderful idea. And it works for us with google adsense, but it desn't work with our adserver (openx).
There's no error. It just simply doesn't work when we try delay the loading of ads from OpenX.
As an example, the original code, provided by Openx for the header leaderbox (728x90), is the following:
<code>
<!--/* OpenX Javascript Tag v2.8.6-rc2 */-->
<!--//<![CDATA[
var m3_u = (location.protocol=='https:'?'https://d1.openx.org/ajs.php':'http://d1.openx.org/ajs.php');
var m3_r = Math.floor(Math.random()*99999999999);
if (!document.MAX_used) document.MAX_used = ',';
document.write ("");
//]]>--><a href='http://d1.openx.org/ck.php?n=ae8b05e8&cb=INSERT_RANDOM_NUMBER_HERE' rel="nofollow"></a>
</code>
So, following your instructions, we changed it for this other one:
<code>
<!--/* OpenX Javascript Tag v2.8.6-rc2 */-->
<!--//<![CDATA[
var m3_u = (location.protocol=='https:'?'https://d1.openx.org/ajs.php':'http://d1.openx.org/ajs.php');
var m3_r = Math.floor(Math.random()*99999999999);
if (!document.MAX_used) document.MAX_used = ',';
document.write ("");
//]]>-->
</code>
At the footer, we introduced the java commands like this:
<code>
<!-- Plugin de retardo de scripts -->
<!-- ! Header grande -->
$(document).ready(function() {
$("div.header_grande").lazyLoadAd() ;
}) ;
</code>
We tried with the full-extended plugin and with the compressed version. We got the same results with both: it doesn't work with OpenX.
We, of course, ran the firebug and everything seems ok. ¿Exactly which information can we provide?
Thans again for your time
1 décembre 2010 19:55
@Ego : perharps can you give me more informations on error you have (use Firebug).
1 décembre 2010 19:28
Hi Guillaume,
Thanks for trying it!
So I most have an issue elsewhere then :), trying to rewrite this horrible html on the fly as a proxy to lazy load a couple of things, inc. an ad.
Must brush up on my js skills then :)
BTW, thanks for starting this plugin, great work, looks very useful, now more sites should start to use it..
1 décembre 2010 01:02
It doesn't seem to work with ads served by adserver.openx.com...
30 novembre 2010 23:15
It doesn't seems to work with ads served by adserver.openx.com...
30 novembre 2010 23:14
Hi Jesper,
I try your tag like this :
<div class="lazyload_ad" original='http://adserver.adtech.de/addyn%7C3.0%7C500%7C1711891%7C0%7C1%7CADTECH; cookie=info;loc=100;target=_blank;key=key=key1+key2+key3+key4'></div>
And it works well for me : Ad banner in 728x90.
30 novembre 2010 12:16
Too bad, tried it with adtech with no luck, as
http://adserver.adtech.de/addyn%7C3.0%7C500%7C1711891%7C0%7C1%7CADTECH; cookie=info;loc=100;target=_blank;key=key=key1+key2+key3+key4
for the js script src, but it didn't seem to work..
30 novembre 2010 00:56
[...] jQuery Lazy Load Ad is a jQuery plugin that takes advantage of Lazy Load delaying ads loading. – Highly improve general page load (Ads are displayed after the page load and only inside the viewport) – Compatibility with AdSense and many other advertisers – Cross Browser support (IE5.5+, Firefox, Opera, Chrome, Safari) A new version of this post and of the jQuery Lazyload Ad plugin is available here [...]
20 octobre 2010 12:00