Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

asoftware's avatar

Add jQuery to Spark

Does anybody have an example for adding jQuery to their Spark app? I get all kinds of errors or it either looks like it is not loading. Any examples of how to reference jQuery with blade template?

0 likes
1 reply
repat's avatar

Without providing more details and error messages it will be difficult to help you. However, you can just pull in jQuery via CDN like this:

<script
  src="https://code.jquery.com/jquery-3.5.1.min.js"
  integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0="
  crossorigin="anonymous"></script>

https://code.jquery.com/

Please or to participate in this conversation.