Skip to content

Commit 2814cc0

Browse files
committed
feat: adding jquery wrapper
1 parent 8d39e9b commit 2814cc0

File tree

4 files changed

+55
-2
lines changed

4 files changed

+55
-2
lines changed

docs/integrations/jquery.md

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
id: jquery
3+
title: jQuery
4+
---
5+
6+
[jQuery wrapper](https://github.com/grid-js/gridjs-jquery) for Grid.js
7+
8+
9+
## Install
10+
11+
Include jQuery and gridjs-jquery in the `<head>` tag:
12+
13+
```html
14+
<script src="https://unpkg.com/jquery/dist/jquery.min.js"></script>
15+
<script src="https://unpkg.com/gridjs-jquery/dist/gridjs.production.min.js"></script>
16+
<link rel="stylesheet" type="text/css" href="https://unpkg.com/gridjs/dist/theme/mermaid.min.css" />
17+
```
18+
19+
or install using NPM:
20+
21+
```bash
22+
npm install --save gridjs-jquery
23+
```
24+
25+
**Note**: `gridjs-jquery` contains Grid.js package as well. You don't need to install it separately.
26+
27+
## Usage
28+
29+
Select your wrapper and call `Grid`:
30+
31+
```js
32+
$("div#wrapper").Grid({
33+
columns: ['Name', 'Age', 'Email'],
34+
data: [
35+
['John', 25, '[email protected]'],
36+
['Mark', 59, '[email protected]'],
37+
// ...
38+
],
39+
});
40+
```
41+
42+
Live example: https://codesandbox.io/s/gridjs-jquery-jq4zf
43+
44+
Grid.js can also convert an HTML table. Simply select the table with jQuery
45+
and call `Grid`:
46+
47+
```js
48+
$("table#myTable").Grid();
49+
```
50+
51+
You can pass all Grid.js configs to the `Grid` function.
52+
See [Grid.js Config](https://gridjs.io/docs/config) for more details.

docs/integrations/react.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
id: react
3-
title: ⚛️ React
3+
title: React
44
---
55

66
Grid.js has native React wrapper which can be used to create Grid.js instance in a React app. Use [gridjs-react](https://github.com/grid-js/gridjs-react)

docs/integrations/vue.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
id: vue
3-
title: 💚 Vue
3+
title: Vue
44
---
55

66
<center><img src="https://user-images.githubusercontent.com/2541728/84843482-ffc31c00-b015-11ea-95e8-dc6fb3931ad5.png" alt="gridjs-vue logo" /></center>

sidebars.js

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ module.exports = {
3131
"🔌 Integrations": [
3232
'integrations/react',
3333
'integrations/vue',
34+
'integrations/jquery',
3435
],
3536
"🎮 Examples": [{
3637
type: 'category',

0 commit comments

Comments
 (0)