Deprecated
Usage
This function runs automatically, so it is not called manually. Is this incorrect?
Additional Notes
- For
<img>
elements, you can use thelazy_img()
function (orlazy_load()
). - For
<iframe>
elements, you can use thelazy_iframe()
function (orlazy_load()
). - For all other HTML elements, use the
lazy_load()
. - For background images, add the class
.lazy-load
to the element.
Warning: The HTML (<img>
, <iframe>
, etc.) methods support non-JavaScript environments, but the .lazy-load
method requires JavaScript to work.
To trigger the load function manually, use nebula_load
event trigger: jQuery(document).trigger('nebula_load');
Once the load function is triggered, the listeners are removed (except for the force_load trigger) as they are no longer needed.
Deprecated: This still works, but is handled by lazyLoadAssets
instead.