v2.0.0
Layzr has been completely rewritten in ES6. The source code has a much more functional feel to it, and it includes an updated build system.
It is still small, fast, and purely vanilla JavaScript. Please read through the new README after reviewing the list of changes below:
Added
srcset
support- event emitter
- example code
CONTRIBUTING.md
Improved
- API
- handling of dynamically added elements
- image setup/configuration
- documentation
Removed
- Bower support (use npm instead)
- DOM ready state checking (replace based on your environment)
container
option (assumed to be thewindow
)selector
option (assumed to be the newdata-normal
attribute)data-layzr-bg
option (can be replicated using the new event emitter)data-layzr-hidden
option (replaced by the newupdate
API method)callback
option (replaced by the event emitter)- ~ 40 lines of source code