Skip to content

Commit b31a569

Browse files
author
Alain Dumesny
committed
changed jquery to "^1.8 || 2 || 3"
fixes #629 * tested samples and lowest we can use is 1.8 (1.7 gives us .append() missing) * I don't see any harm is listing a wider range. Still using latest locally (smaller)
1 parent 0a51f87 commit b31a569

File tree

4 files changed

+10
-16
lines changed

4 files changed

+10
-16
lines changed

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ Join gridstack.js on Slack: https://gridstackjs.troolee.com
1919
- [Demo and examples](#demo-and-examples)
2020
- [Usage](#usage)
2121
- [Requirements](#requirements)
22-
- [Using gridstack.js with jQuery UI](#using-gridstackjs-with-jquery-ui)
2322
- [Install](#install)
2423
- [Basic usage](#basic-usage)
2524
- [Migrating to v0.3.0](#migrating-to-v030)
@@ -46,13 +45,13 @@ Usage
4645

4746
## Requirements
4847

49-
* [jQuery](http://jquery.com) (>= 3.1.0)
48+
* [jQuery](http://jquery.com) (>= 1.8)
5049
* `Array.prototype.find`, and `Number.isNaN()` for IE and older browsers.
5150
* Note: as of v0.5.4 We supply a separate `gridstack.poly.js` for that
5251
(part of `gridstack.all.js`) or you can look at other pollyfills
5352
([core.js](https://github.com/zloirock/core-js#ecmascript-6-array) and [mozilla.org](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)).
5453

55-
#### Using gridstack.js with jQuery UI
54+
Using gridstack.js with jQuery UI
5655

5756
* [jQuery UI](http://jqueryui.com) (>= 1.12.0). Minimum required components: Draggable, Droppable, Resizable (Widget, Mouse, core).
5857
* Note: as of v0.5.4 we include this subset as `jquery-ui.js` (and min.js) which is part of `gridstack.all.js`. If you wish to bring your own lib, include the individual gridstack parts instead of all.js
@@ -188,14 +187,14 @@ GridStack makes it very easy if you need [1-12] columns out of the box (default
188187
$('.grid-stack').gridstack( {column: N} );
189188
```
190189

191-
2) and change your HTML accordingly if **N < 12** (else custom CSS section next). Without this, things will not render/work correctly.
190+
2) include `gridstack-extra.css` if **N < 12** (else custom CSS - see next). Without these, things will not render/work correctly.
192191
```html
193192
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/gridstack@latest/dist/gridstack-extra.css"/>
194193

195194
<div class="grid-stack grid-stack-N">...</div>
196195
```
197196

198-
Note `grid-stack-N` class was added.
197+
Note `grid-stack-N` class was added, and extra CSS.
199198

200199
`gridstack-extra.css` (and `gridstack-extra.min.css`) defines CSS for grids with custom [1-12] columns. Anything more and you'll need to generate the SASS/CSS yourself (see next).
201200

doc/CHANGES.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ Change log
2626
## v0.5.3-dev (upcoming changes)
2727

2828
- add `gridstack.poly.js` for IE and older browsers, removed `core-js` lib from samples (<1k vs 85k), and all IE8 mentions ([#1061](https://github.com/gridstack/gridstack.js/pull/1061)).
29-
- add `jquery-ui.js` (and min.js) as minimal subset we need (55k vs 248k), which is now part of `gridstack.all.js` - so just 1 include needed now.
29+
- add `jquery-ui.js` (and min.js) as minimal subset we need (55k vs 248k), which is now part of `gridstack.all.js`. Include individual parts if you need your own lib instead of all.js
30+
([#1064](https://github.com/gridstack/gridstack.js/pull/1064)).
31+
- changed jquery dep to lowest we can use (>=1.8) ([#629](https://github.com/gridstack/gridstack.js/issues/629)).
3032

3133
## v0.5.3 (2019-11-20)
3234

package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818
"gridstack",
1919
"grid",
2020
"gridster",
21-
"layout",
22-
"jquery"
21+
"layout"
2322
],
2423
"author": "Pavel Reznikov <pashka.reznikov@gmail.com>",
2524
"contributors": [
@@ -32,10 +31,9 @@
3231
},
3332
"homepage": "http://gridstack.github.io/gridstack.js/",
3433
"dependencies": {
35-
"jquery": "^3.1.0"
34+
"jquery": "^1.8 || 2 || 3"
3635
},
3736
"devDependencies": {
38-
"components-jqueryui": "1.12.1",
3937
"connect": "^3.6.6",
4038
"core-js": "^3.0.0",
4139
"coveralls": "^3.0.3",

yarn.lock

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -772,11 +772,6 @@ component-inherit@0.0.3:
772772
resolved "https://registry.yarnpkg.com/component-inherit/-/component-inherit-0.0.3.tgz#645fc4adf58b72b649d5cae65135619db26ff143"
773773
integrity sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM=
774774

775-
components-jqueryui@1.12.1:
776-
version "1.12.1"
777-
resolved "https://registry.yarnpkg.com/components-jqueryui/-/components-jqueryui-1.12.1.tgz#617076f128f3be4c265f3e2db50471ef96cd9cee"
778-
integrity sha1-YXB28SjzvkwmXz4ttQRx75bNnO4=
779-
780775
concat-map@0.0.1:
781776
version "0.0.1"
782777
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
@@ -2749,7 +2744,7 @@ jasminewd2@^2.1.0:
27492744
resolved "https://registry.yarnpkg.com/jasminewd2/-/jasminewd2-2.2.0.tgz#e37cf0b17f199cce23bea71b2039395246b4ec4e"
27502745
integrity sha1-43zwsX8ZnM4jvqcbIDk5Uka07E4=
27512746

2752-
jquery@^3.1.0:
2747+
"jquery@^1.8 || 2 || 3":
27532748
version "3.4.1"
27542749
resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.4.1.tgz#714f1f8d9dde4bdfa55764ba37ef214630d80ef2"
27552750
integrity sha512-36+AdBzCL+y6qjw5Tx7HgzeGCzC81MDDgaUP8ld2zhx58HdqXGoBd+tHdrBMiyjGQs0Hxs/MLZTu/eHNJJuWPw==

0 commit comments

Comments
 (0)