Using JavaScript and jQuery libraries
JavaScript and jQuery libraries can significantly extend the functionality of Power Pages, from improving user interfaces to adding advanced features.
To include an external library in a website, developers typically add a <script>
tag to the HTML that points to the library’s URL. Developers can add this tag to the page or form. For example, suppose Sarah wants to use a jQuery UI library. Sarah would add a reference to it in the form like this to add the Chart library:
<!-- Include Chart.js library --> <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
Sarah can then use the features provided by the jQuery UI library on her website. The Chart.js
library is a powerful, flexible, open-source charting library for designers and developers. Sarah can use it to add interactive charts to her Power Pages.
Using Chart.js in Power Pages
Sarah wants to create a pie chart to represent the distribution...