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 245 forks source link

.lazy-hidden not removed after successful load #62

Open jackmcconnell opened 8 years ago

jackmcconnell commented 8 years ago

I'm using the jquery.lazyloadxt.widget.js to lazy load embedded Tweets.

The tweets are being inserted using WordPress so for now, i'm wrapping them in my js file like so: jQuery(".twitter-tweet").wrap('<div data-lazy-widget></div>');

However, after loading, the lazy-hidden class isn't removed from the wrapping div.

Additionally, if the jquery.lazyloadxt.bg.js is also loaded, then it applies the following to any lazy items, including the wrapping div for the embedded Tweets: style="background-image: url(DOMAINNAME/undefined);, where DOMAINNAME is, naturally, my domain name.

Here's a screenshot: screenshot 2015-10-08 16 47 56

I was using the version in Bower but it seems it's only 1.0.5 so updated it to the master branch which seems to be 1.0.6 but it doesn't seem to make any difference.

Do you know why this might be?

Thanks, Jack