Thanks for your reply. That is not very correct on many occasions. If we are dealing with a section that is used in different places, you may be loading the same JS several times. That’s what{% javascript %} avoids and that’s why I was trying to use it in this case.
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Liquid logic in {% javascript %} - shopify section | 2 | 109 | November 12, 2020 | |
| The liquid {% javascript %} is giving me trouble | 1 | 28 | January 27, 2021 | |
| Cache and Theme Customiser issues with {% stylesheet %} and {% javascript %} section assets | 3 | 248 | May 27, 2024 | |
| Javascript won't render when i put it between liquid tags {% javascript %} {% endjavascript %} | 0 | 20 | December 23, 2021 | |
| Help! Why the liquid tags are not working in .html() in javascript?! | 12 | 266 | October 18, 2023 |