1.0.25 • Published 4 years ago

lazy-modules-test v1.0.25

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

Lazy Listener Package

Package has implemented lazy loading for images and videos. Package functions logs informations such as div name, visibility in percent, div height and width. There is also a function that gives information about video duration, current video time and percent of the video played. To lazy load images, image src attribute have to be replaced with lazy-src and video src attribute have to be changed to lazy-vid.

List of functions included:

Functiondescription
config('classname',interval in ms)set configuration for timer, which is counting how long divs from given class are visible above 50%,
printdata()log informations about percent of visibility and time of visibility above 50% of divs from given class,
printdataloop()logs informations in loop every interval set
stopprint()stops logging informations
timerclear()restart timers, use it everytime when you change config
alldiv('classname')logs informations about every div from given class on your website
selecteddiv(divname)logs informations about selected div
divpos(divname)logs distance from div footer to the top of site and from div top to the site footer
time()logs informations about video

##How to add to your code:

To use package You have to just add \ <script src="node_modules/lazy-load-timer/bundle.js"></script> to your HTML file :sunglasses:

1.0.25

4 years ago

1.0.2

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.24

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago