jQuery Integration
ZingGrid works with your development stack, including jQuery! In this guide, we'll walk you through how to add ZingGrid to your jQuery project.
Usage
-
Include the following dependencies in the header of your HTML file:
<script src="path/to/zinggrid.min.js" defer></script>
-
Create a
<zing-grid>
component, like so:<zing-grid id="myGrid" caption="Hello Doggos"></zing-grid>
-
Use jQuery to set or change your data, like so:
$(document).ready(function() { const $gridRef = $('#myGrid'); let datastore = [ { "breed": "Dachshund", "name": "Sousage"}, { "breed": "Corgi", "name": "Plop"}, { "breed": "Pomeranian", "name": "Floof"} ]; $gridRef.attr('data', JSON.stringify(datastore)); });
jQuery Integrated Grid
Here is our complete grid that is successfully integrated with jQuery:
Top
[integrations: JQuery]