# lazy

Source: https://zotonic.com/docs/1393/lazy

URI: https://zotonic.com/id/1393

Language: en



Custom tag which adds a ‘loader’ image to the page and performs a one-time action when loader comes into view.

`mod_geomap` uses this to load the map JavaScript once the admin widget has been opened by the user.

Example:

```none
<div id="{{ #lazy }}">
    {% lazy action={update target=#lazy id=id template="_geomap_admin_location_map.tpl"} %}
</div>
```

`lazy` accepts the following arguments:

| Argument | Description                                                       | Example                         |
| -------- | ----------------------------------------------------------------- | ------------------------------- |
| image    | The source of the image tag. Defaults to /lib/images/spinner.gif. | image=”/lib/images/loading.gif” |
| class    | The css class of the image. Defaults to z-lazy.                   | class=”loader”                  |

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/1393?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/1393?language=en>)
