![css](https://habrastorage.org/r/w120/webt/5a/6c/29/5a6c295a5de0d066850531.png)
CSS
0
Вклад в тег
function addStyle(elementId, animationClassName) {
...
var elem = document.getElementById(elementId);
var father = elem.parentNode;
elem.removeAttribute('style');
var newElem = elem.cloneNode(true);
elem.parentNode.removeChild(elem);
father.appendChild(newElem);
newElem.setAttribute('style', getStyleValue(animationClassName));
}