Skip to main content

javascript

JavaScript code included in section, block and snippet files.

Each section, block or snippet can have only one {% javascript %} tag.

To learn more about how JavaScript that's defined between the javascript tags is loaded and run, refer to the documentation for javascript tags.


Caution

Liquid isn't rendered inside of {% javascript %} tags. Including Liquid code can cause syntax errors.


Syntax

{% javascript %}
javascript_code
{% endjavascript %}
javascript_code

The JavaScript code for the section, block or snippet.

Was this page helpful?