Basic example
Lazy Loading will automatically initialize after adding
data-te-lazy-load-init
attribute to your img or video element.
It is important to add data-te-lazy-src
attribute - otherwise,
Lazy Load will throw an error.
Scroll down to see an image
Hey there 👋 we want to make TW elements a community-driven project. It's open source and free, and we would like it to stay that way. If you enjoy it, help the project grow by sharing it with your peers. Every share counts, thank you!
Offset
Use data-te-lazy-offset
attribute to define an additional
amount of pixels after which image or video will show.
Scroll more down to load a picture.
Error
Use data-te-lazy-error
to define a picture that will show if
image or video doesn't load.
Animations
Use data-te-lazy-animation
to specify which animation you want
to activate when element loads.
Container
Initialize a set of elements at once by adding
data-te-lazy-load-init
attribute to their container. If you set
data-te-lazy
attributes in the parent, all of
img
and video
elements inside will inherit them. You can overwrite them by declaring these
attributes in inner elements.