rooreynolds/jargone

IE8 problem and fix

Opened this issue · 1 comments

I found it wasn't working in IE8, which our editors have to use. This describes the problem:

http://stackoverflow.com/questions/6631871/modifying-the-innerhtml-of-a-style-element-in-ie8

The solution is to change the line setting css.innerHTML to this:

var cssText = ".jargonehighlight { background-color: #FFFF88 !important; color: black; } .jargonehasnotes { cursor: help; border-bottom:1px dashed !important; } #jargonepopup { position: fixed; z-index: 1000 !important; visibility: hidden; background-color: #FFFFCC; color: black; border: solid silver 1px; margin: 5px; padding: 6px;} "; if (typeof(css.styleSheet) != 'undefined') { css.styleSheet.cssText = cssText; } else { css.innerHTML = cssText; }

Clearing the tip onscroll isn't working in IE8 though.