Script tag

From Shopify Wiki

Jump to: navigation, search

This filter takes a url with a .js file and puts a script tag around it. You will want to use this in your html's header for all your javascript files.

Example:

{{ 'shop.js' | asset_url | script_tag }}

Results in:

<script src="/files/shops/random_number/assets/shop.js" type="text/javascript"></script>
Personal tools