ractive-lazyload-img
A Ractive decorator that lazy-loads images when they get close to in view
Last updated 4 years ago by tehshrike .
WTFPL · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install ractive-lazyload-img 
SYNC missed versions from official npm registry.

ractive-lazyload-img

A Ractive decorator that lazy-loads images when they get within 200px of the viewport.

Usage

const lazy = require('ractive-lazyload-img')

new Ractive({
	el: '#content',
	template: '#template',
	decorators: {
		lazy
	}
})

<img
	src="/transparent-pixel.png"
	as-lazy="'/path/to/images/' + dynamicImageName"
/>

License

WTFPL

Current Tags

  • 1.0.1                                ...           latest (4 years ago)

2 Versions

  • 1.0.1                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (4)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |