the liquid {% javascript %} is giving me trouble

treysmith
Tourist
6 0 1

First off, the {% javascript %} is not on the Shopify Cheat Sheet — A resource for building Shopify Themes with Liquid which is a little frustrating. I love this resource just might be dated? I do not know.

 

But currently, I am trying to have a user input some data. Then when they press a button it calls a function. But when I press the button, it says the function does not exist. I am confused of the scope of the {% javascript %} tag and if it is actually important to use? Why would I not just use a normal HTML <script> tag instead? 

Thank you in advance for your help.

0 Likes
treysmith
Tourist
6 0 1

This works:

treysmith_0-1611774817140.png

 

This does not:

treysmith_1-1611774864229.png

 

 

0 Likes