diff --git a/README.md b/README.md index a085851..0eddd0b 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/spec/utils-spec.js b/spec/utils-spec.js index 0992767..0a92c92 100644 --- a/spec/utils-spec.js +++ b/spec/utils-spec.js @@ -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); }); }); diff --git a/src/gridstack.js b/src/gridstack.js index b74b20d..0de1a19 100644 --- a/src/gridstack.js +++ b/src/gridstack.js @@ -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,