Suite | Growth, Professional, Enterprise, or Enterprise Plus |
Support with | Guide, any plan |
Con Guide Templating V2, devi importare una libreria jQuery se vuoi usare le istruzioni jQuery in un tema al posto di Vanilla JavaScript.
Questa guida è solo a scopo didattico. In caso di problemi con jQuery, consulta il sito jQuery ufficiale.
Per installare o aggiornare jQuery nei temi del centro assistenza
- In Amministratore Knowledge, fai clic su Personalizza design (
) nella barra laterale.
- Nel tema che vuoi usare, fai clic su Personalizza.
- Fai clic su Modifica codice.
- Fai clic su document_head.hbs.
- Visita https://code.jquery.com e fai clic sulla versione ridotta della versione jQuery che vuoi usare.
- Incolla il tag
script
nel file HTML. Esempio:<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"> </script>
Il valore
integrity
varia. L'attributo informa i browser che le risorse ospitate sul server di terze parti non sono state manomesse.
La libreria jQuery è caricata e puoi includere istruzioni jQuery nei temi del centro assistenza.
2 commenti
Christopher Kennedy
Hi Bradley,
You can use the version of jQuery that you'd like in your theme. That portion is totally within your control. Also, this article demonstrates loading jQuery from the document_head.hbs template. This template renders on all Help Center pages, so no need to duplicate that effort elsewhere.
Thanks,
0
Brad Allen
Two questions related to this.
1 - what version of jquery must be installed to use this code?
2 - does this just need to be added to the script.js file in templates or do i need some HTML in my new requests template as well?
0
Accedi per lasciare un commento.