Skip to content
Zotonic
  • Start
  • Cookbook
  • Reference
  • Releases

Live search

Search across all Zotonic content

Type at least two characters

Results are matched against titles, summaries and topics as you type.

Tags
  • Reference
  • Frontend developer
  • User interface and interaction
  • Template
  • JavaScript

javascript

Adds javascript that will be run after jQuery has been initialized. In dynamic content it will run after the DOM has been updated with the template where the javascript was defined.

Example:

{% javascript %}
  ...
{% endjavascript %}

Edit on GitHub

Related documentation

Actions

overlay_open

Renders a template on the server and opens a full screen overlay with the HTML output of the template.

Actions

dialog_open

Renders a template on the server and opens a dialog with the HTML output of the template.

Cotonic models

model/activity Cotonic

model/activity Publishes browser activity observed by Zotonic's wires script. This is an event-only model: it has no get , post , or delete…

Cotonic models

model/alert Cotonic

model/alert Displays a Zotonic alert dialog through the wires script and z_dialog_alert . The page must have the normal Zotonic dialog…

Cotonic models

model/clipboard Cotonic

model/clipboard Copies text using the browser Clipboard API. Implemented in the wires script. Browser clipboard availability and permission…

Cotonic models

model/auth-ui Cotonic

model/auth-ui Manages Zotonic's login, reminder, verification, reset, and password-change views. The standard _logon.tpl starts the worker…

Cotonic models

model/loadmore Cotonic

model/loadmore Replaces a loader element with a server-rendered template. Include js/models/loadmore.js from mod_base on pages that use…

Cotonic models

model/wires Cotonic

model/wires Connects Cotonic messages to named Zotonic events through the wires script.

Cotonic models

model/document Cotonic

The document model can be used to retrieve details about the current document.

GitHub © 2026 Zotonic