You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Store your JavaScript files under assets/js in your theme.
Loading Scripts
Inside your theme open /app/assets/js-assets.php
Add a load_js() call. The first parameter is the URL to the JS file. The second optional parameter is an array of arguments. See arguments.
If handle is not defined as an arg the URL parameter will be used.
If ver is not defined as an arg the theme version will be used.
Cache Busting
If you don't define "ver" then it will append the theme version to your JavaScript file's URL. You can use this for cache busting - simply bump the version number of your theme.
Examples
If you simply need to load a JavaScript file you can do: