luis-almeida / unveil

A very lightweight jQuery plugin to lazy load images
4.16k stars 676 forks source link

Allow Loading on any attribute #69

Closed samanpwbb closed 5 years ago

samanpwbb commented 10 years ago

Allows user to pass attribute parameter. If no attribute parameter is passed, defaults to src. Useful for elements with style='background-image(...)'.

Sort of a different take on https://github.com/luis-almeida/unveil/pull/40.

chimericdream commented 9 years ago

:+1: on this. I was looking for this exact functionality.

X17 commented 9 years ago

@samanpwbb @chimericdream

how to implement this feature???

i am assuming the html tag to be div data-src="img2.jpg" data-src-retina="img2-retina.jpg" style="background-image: url('bg.png')"

and what should i use in selector to initialize in place of $("img").trigger("unveil");