ressio / lazy-load-xt

Lazy load XT is a jQuery plugin for images, videos and other media
http://ress.io/lazy-load-xt-jquery/
MIT License
1.36k stars 243 forks source link

Is the widget add-on supposed to work on any javascript snippet that creates an iframe? #82

Open jesserosenfield opened 8 years ago

jesserosenfield commented 8 years ago

The documentation isn't clear to me on this one. I'm trying to use lazy load on google double click ad code, which generates an iframe:

<!-- /29665623/ArticleContent_728x90_Footer -->
<div id='div-gpt-ad-1459394446513-6' style='height:90px; width:728px;' data-lazy-widget>
<!-- <script type='text/javascript'>
googletag.cmd.push(function() { googletag.display('div-gpt-ad-1459394446513-6'); });
</script> -->
</div>

The div with [data-lazy-widget] gets the lazy-loaded class added but the script does not get un-commented like in the demo:

http://ressio.github.io/lazy-load-xt/demo/widget.htm

Am I doing something wrong here? Or is the widget add-on not meant for this purpose?

Thanks

roelmagdaleno commented 6 years ago

Hi! Did you firgure it out how to do it? In some sites of mine is working good others don't!