I'm still getting my head around htmx/sprig. I want to create some lazy loaded elements on the page.
I've tried the following, but the once parameter does not seem to be respected, it will continuously poll the template, so I think i've misunderstood how this is meant to be done.
Parent:
{{ sprig('_components/_sprigIframe') }}
_components/_sprigIframe:
<div class="" sprig s-trigger="load once">
{% if not sprig.request %}
loading...
{% else %}
My iframe code
{% endif %}
</div>
I'm still getting my head around htmx/sprig. I want to create some lazy loaded elements on the page.
I've tried the following, but the
once
parameter does not seem to be respected, it will continuously poll the template, so I think i've misunderstood how this is meant to be done.Parent:
_components/_sprigIframe:
Thanks