Answers for "add js to shopify page"

1

how to add jquery to shopify

<!-- Include jQuery in your theme.liquid file, between <head> tag  -->
  
  <head>
    <script
    src="https://code.jquery.com/jquery-3.4.1.js"
    integrity="sha256-WpOohJOqMqqyKL9FccASB9O0KwACQJpFTUBLTYOVvVU="
    crossorigin="anonymous">
  	</script>  
  </head>
Posted by: Guest on December-07-2020
0

custom js shopify

If I understand correctly, the asset_url filter is what you are looking for.

To include a JS file in a .liquid file, you use:

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

And a CSS file:

{{ 'style.css' | asset_url | stylesheet_tag }}
Posted by: Guest on September-30-2020

Browse Popular Code Answers by Language