diff --git a/slick.grid.js b/slick.grid.js
index e30cddf..6552ba4 100644
--- a/slick.grid.js
+++ b/slick.grid.js
@@ -918,7 +918,11 @@ if (typeof Slick === "undefined") {
}
function createCssRules() {
- $style = $("").appendTo($("head"));
+ // IE limits # of sheets to ~31, instead of adding a new style sheet for each grid just use one
+ $style = $('#slickGridStyleSheet');
+ if (!$style[0]) {
+ $style = $("").appendTo($("head"));
+ }
var rowHeight = (options.rowHeight - cellHeightDiff);
var rules = [
"." + uid + " .slick-header-column { left: 1000px; }",
@@ -934,7 +938,7 @@ if (typeof Slick === "undefined") {
}
if ($style[0].styleSheet) { // IE
- $style[0].styleSheet.cssText = rules.join(" ");
+ $style[0].styleSheet.cssText += rules.join(" ");
} else {
$style[0].appendChild(document.createTextNode(rules.join(" ")));
}