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 divs 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

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -