With Guide Templating V2, you'll need to import a jQuery library if you want to use jQuery statements in a theme in place of vanilla JavaScript.
This guidance is for instructional purposes only, and if you have any jQuery issues, see the official jQuery site.
To install or upgrade jQuery in your Help Center themes
- In Guide, click the Customize design icon () in the sidebar.
- From the theme you want to work with, click Customize.
- Click Edit code.
- Click document_head.hbs.
- Visit https://code.jquery.com and click on the minified version of the jQuery version you want to use.
- Paste the
script
tag into your HTML file. Example:<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"> </script>
The
integrity
value will vary. The attribute lets browsers know that the resources hosted on the third-party server have not been tampered with.
The jQuery library is loaded, and you can include jQuery statements in your Help Center themes.