From the annotated source of Page.prototype.lazyload:
`Runs the given lazy-loading callback on all unloaded page content.
Takes:
callback: a function of the form function([$el]){}. Will run on each unloaded element, and will use the element as its calling context.`
I take it this means that each 'unloaded element', is a ListItem correct? This would make sense: each lazyloaded page iterates it's containing listitems and calls the optionally supplied Lazyload-function on each of them.
However this is not what's happening in Page.prototype.lazyload. Instead $el[x] is passed to the lazyloadfunction. Since $el is a jquery-wrapper around the page-domelement, $el only contains 1 element ($el[0]) the page dom element itself.
instead, iterating over $el.children() instead would do the trick, if I'm right about what Page.prototype.lazyload is supposed to do that is.
From the annotated source of Page.prototype.lazyload:
`Runs the given lazy-loading callback on all unloaded page content.
Takes: callback: a function of the form function([$el]){}. Will run on each unloaded element, and will use the element as its calling context.`
I take it this means that each 'unloaded element', is a ListItem correct? This would make sense: each lazyloaded page iterates it's containing listitems and calls the optionally supplied Lazyload-function on each of them.
However this is not what's happening in Page.prototype.lazyload. Instead $el[x] is passed to the lazyloadfunction. Since $el is a jquery-wrapper around the page-domelement, $el only contains 1 element ($el[0]) the page dom element itself.
instead, iterating over $el.children() instead would do the trick, if I'm right about what Page.prototype.lazyload is supposed to do that is.