CSS doesn't apply to dynamically created elements in IE 7?

后端 未结 7 1529
不思量自难忘°
不思量自难忘° 2021-02-13 10:32

Still looking for an answer.

Changing or reassigning to the filter\'s innerHTML successfully redraws the element, but breaks my script, so that\'s out.

7条回答
  •  时光取名叫无心
    2021-02-13 11:30

    The problem, I've discovered is that IE 6/7 doesn't register the class name changes with elm.setAttribute('class','x') until the UI is redrawn.

    The solution is to use the form elm.className = 'x'

    **This problem was also noticeable from moving from IE9 quirks to standards mode. The solution was the same.

提交回复
热议问题