Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Lazyload images, iframes, widgets with a standalone JavaScript lazyloader ~1kb

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
test
README
index.js
lazyload.js
lazyload.min.js
package.json

README

Standalone javascript image lazy loader


TODO:
function elementInViewport(el) {
    var rect = el.getBoundingClientRect()
    return (
        rect.top + rect.height >= 0 &&
        rect.left + rect.width >= 0 &&
        rect.bottom - rect.height <= window.innerHeight &&
        rect.right - rect.width <= window.innerWidth
        )
}
Something went wrong with that request. Please try again.