fix jquery size()

This commit is contained in:
Pavel Reznikov 2016-08-09 18:54:26 -07:00
parent fb157a3dd2
commit 4c3abe8e63
3 changed files with 7 additions and 3 deletions

View file

@ -475,6 +475,10 @@ Changes
=======
#### v0.2.6-dev (Development version)
- update requirements to the latest versions
- fix jQuery `size()`
#### v0.2.5 (2016-03-02)
- update names to respect js naming convention.

View file

@ -67,14 +67,14 @@ describe('gridstack utils', function() {
var style = $('STYLE[data-gs-style-id=' + _id + ']');
expect(style.size()).toEqual(1);
expect(style.length).toEqual(1);
expect(style.prop('tagName')).toEqual('STYLE');
utils.removeStylesheet(_id)
style = $('STYLE[data-gs-style-id=' + _id + ']');
expect(style.size()).toEqual(0);
expect(style.length).toEqual(0);
});
});

View file

@ -508,7 +508,7 @@
// jscs:enable requireCamelCaseOrUpperCaseIdentifiers
opts.itemClass = opts.itemClass || 'grid-stack-item';
var isNested = this.container.closest('.' + opts.itemClass).size() > 0;
var isNested = this.container.closest('.' + opts.itemClass).length > 0;
this.opts = _.defaults(opts || {}, {
width: parseInt(this.container.attr('data-gs-width')) || 12,