javascript - LazyLoad on multiple elements with both default and non-default sources and attributes -
i using lazyload xt (https://github.com/ressio/lazy-load-xt) load default <img>
s , it's working fine using
$.extend($.lazyloadxt, { selector: 'img', srcattr: 'src' });
i using srcattr: 'src'
due compatibility third party plugin requires default src
. however, have several div
s background-image
lazy load. question is; how configure plugin target div fx .someclass
lazy load background-image default attr data-bg
? i've tried several different variations seem cancel other 1 out. back-ground image work not <img>
etc. furthermore have html5 video running lazy load default src
instead of data-src
.
basically, know how define each element lazyload, based on fx class, , src attribute whether it's lazyload default or html default.
for information have included plugin using bower , use both jquery.lazyloadxt.js
, jquery.lazyloadxt.extra.js
.
sorry noob question, hope can help.
Comments
Post a Comment