Skip to content

Commit 4c3abe8

Browse files
committed
fix jquery size()
1 parent fb157a3 commit 4c3abe8

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,10 @@ Changes
475475
=======
476476

477477
#### v0.2.6-dev (Development version)
478+
479+
- update requirements to the latest versions
480+
- fix jQuery `size()`
481+
478482
#### v0.2.5 (2016-03-02)
479483

480484
- update names to respect js naming convention.

spec/utils-spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,14 @@ describe('gridstack utils', function() {
6767

6868
var style = $('STYLE[data-gs-style-id=' + _id + ']');
6969

70-
expect(style.size()).toEqual(1);
70+
expect(style.length).toEqual(1);
7171
expect(style.prop('tagName')).toEqual('STYLE');
7272

7373
utils.removeStylesheet(_id)
7474

7575
style = $('STYLE[data-gs-style-id=' + _id + ']');
7676

77-
expect(style.size()).toEqual(0);
77+
expect(style.length).toEqual(0);
7878
});
7979

8080
});

src/gridstack.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@
508508
// jscs:enable requireCamelCaseOrUpperCaseIdentifiers
509509

510510
opts.itemClass = opts.itemClass || 'grid-stack-item';
511-
var isNested = this.container.closest('.' + opts.itemClass).size() > 0;
511+
var isNested = this.container.closest('.' + opts.itemClass).length > 0;
512512

513513
this.opts = _.defaults(opts || {}, {
514514
width: parseInt(this.container.attr('data-gs-width')) || 12,

0 commit comments

Comments
 (0)