diff --git a/client.js b/client.js index 899c17a6..1e93b8cc 100644 --- a/client.js +++ b/client.js @@ -50,7 +50,8 @@ var CloudClient = { * seting up in init() */ HEIGHT :0, - MIN_ONE_PANEL_WIDTH :1155 + MIN_ONE_PANEL_WIDTH :1155, + OLD_BROWSER :false }; /* @@ -302,13 +303,29 @@ CloudClient.Util = (function(){ * образом: {src: ' ',func: '', id: '', element: '', inner: ''} * все параметры опциональны */ - this.cssSet = function(pParams_o){ - pParams_o.name = 'style'; - pParams_o.parent = pParams_o.parent || document.head; - return this.anyload(pParams_o); + this.cssSet = (CloudCommander.OLD_BROWSER)? + /* if browser is old - make in diferen way */ + function(pParams_o){ + var lElement = ''; + return $(lElement) + .appendTo(pParams_o.parent || document.head); + + } + :function(pParams_o){ + pParams_o.name = 'style'; + pParams_o.parent = pParams_o.parent || document.head; + + return this.anyload(pParams_o); + + }, /* Function loads external css files * @pParams_o - структура параметров, заполняеться таким * образом: {src: ' ',func: '', id: '', element: '', inner: ''} @@ -791,6 +808,11 @@ var CloudFunc, $, Util, */ CloudClient.init=(function() { + if(!document.head){ + this.OLD_BROWSER = true; + document.head = document.getElementsByTagName("head")[0]; + } + Util = new CloudClient.Util(); getByClass = Util.getByClass; getById = Util.getById; diff --git a/index.html b/index.html index 0f1a5fe4..c088d4ab 100644 --- a/index.html +++ b/index.html @@ -7,10 +7,14 @@