A lightweight, fast, feature-rich, powerful and highly configurable delayed content, image and background lazy loading plugin for jQuery & Zepto.
New Features:
srcset
and sizes
on <img>
tagsimagebase
attribute can now be set for single elementsNew Plugins:
Code Changes:
configuration
function to config
to be more consistentconfig()
function to config
objectname
from prototype to configuration optionfor
loop usage everywhereif
-conditions whenever possibleonFinishedAll
with custom loaders or plugin onlyload
or error
event on plugins and custom loadersMinimization Changes:
_getElementTagName
for reused taskDescription Changes:
onFinishedAll
event was not triggered correctly in some cases$.size()
function with length
property.on('load', ...)
instead of .load(...)
(thx @pentie)getItems()
now returns only not completely loaded elements left (thx @zspitzer)After exactly three years of open source development, many improvements and currently no open issues I think we're stable so far! So it's time to give Lazy an officially new major version. :tada:
Changes:
destroy()
return undefined
to possible redefine own variablesfixed bug on using custom loaders since newly added imageBase
imageBase
lazy.jquery.json
because plugin registry is dead :(bower.json
and package.json
Code Changes:
custom loaders
be able to load every content you want toconfig
, addItems
and getItems
loadAll
ignores throttle nowautoDestroy
optionthis
_lazyLoadItems
for better detection and fixed visibility bugfallbackWidth
and 'fallbackHeight` from configuration because of new handling_items
variable from plugin, unnecessary double definition_triggerCallback
now supports multiple arguments passed to callback_triggerCallback
now returns a boolean indicates if callback was found_addItemsPlaceholder
is now _prepareItems
and contains all logic made on every itemsDescription Changes:
images
to items
Other: