diff options
author | Victor Dubiniuk <victor.dubiniuk@gmail.com> | 2013-07-02 19:44:10 +0400 |
---|---|---|
committer | Victor Dubiniuk <victor.dubiniuk@gmail.com> | 2013-07-09 16:42:47 +0400 |
commit | 0916bff81d57ce2df16350164bae460946a79b4a (patch) | |
tree | c0dc5723898f9b6e0a0ac994342ae44257eac1b9 /core | |
parent | 36491371c8fb494e0cfbad5c6f92f552d3542177 (diff) |
Fix lazy styles loading in IE8
Diffstat (limited to 'core')
-rw-r--r-- | core/js/js.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/core/js/js.js b/core/js/js.js index a4665b927f2..aa1bcf642ee 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -226,8 +226,12 @@ var OC={ var path=OC.filePath(app,'css',style+'.css'); if(OC.addStyle.loaded.indexOf(path)===-1){ OC.addStyle.loaded.push(path); - style=$('<link rel="stylesheet" type="text/css" href="'+path+'"/>'); - $('head').append(style); + if (document.createStyleSheet) { + document.createStyleSheet(path); + } else { + style=$('<link rel="stylesheet" type="text/css" href="'+path+'"/>'); + $('head').append(style); + } } }, basename: function(path) { |