wiley / madgex-lazy-ads

Deliver synchronous ads asynchronously, without modifying the ad code. Also, conditionally load ads for responsive websites using a media query or the ad container's dimensions.
MIT License
656 stars 42 forks source link

add class to loaded ad #6

Closed stereonom closed 10 years ago

stereonom commented 10 years ago

When an ad is loaded it would be useful if the surrounding div gets an additional class that marks the ad as loaded. So you can add some css only to loaded ads.

<div class="ad loaded" data-lazyad>…</div>
jameswragg commented 10 years ago

On the develop branch I've committed code that adds a data-lazyad-loaded attribute on matched & loaded ad containers.