Again, IE proves that is full with bugs. Simple but effective solution.

If you have the following code:

var element = document.createElement("div");
element.setAttribute("class", "yourClassName");

change it to:

var element = document.createElement("div");
element.className = "yourClassName";

.className property also works in FF, Opera and Safari.