diff --git a/gridstack.js b/gridstack.js index 8a4f12a..e5f0baf 100644 --- a/gridstack.js +++ b/gridstack.js @@ -470,10 +470,10 @@ GridStack.prototype._init_styles = function () { if (this._styles_id) { - $('link[rel=stylesheet][data-gs-id=' + this._styles_id + ']').remove(); + $('[data-gs-id="' + this._styles_id + '"]').remove(); } this._styles_id = 'gridstack-style-' + (Math.random() * 100000).toFixed(); - this._styles = Utils.create_stylesheet(); + this._styles = Utils.create_stylesheet(this._styles_id); if (this._styles != null) this._styles._max = 0; };