Skip to content

Lightweight javascript module for detecting presence of DOM element on screen

Notifications You must be signed in to change notification settings

AlexPenkin/visible.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

visible.js

Lightweight javascript module for detecting presence of DOM element on screen

Usage

var checker = new Checker('.lazy');

checker.addActionOnVisible(function (elem) {
    elem.innerHTML = 'visible';  
    elem.style.background = "white";
    elem.style.fontSize = '25px'
});

checker.addActionOnInVisible(function (elem) {
    elem.innerHTML = 'inVisible';  
    elem.style.background = "gray"; 
});

Example on CodePen :octocat: :octocat: :octocat:

About

Lightweight javascript module for detecting presence of DOM element on screen

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published