I know that altering element\'s style via JavaScript directly will cause a reflow. However, I was wondering if it is possible to alter multiple style values in a batch with
You could put all the styles in a CSS class
.foo { background:#000; color:#fff; ... }
and then assign it to the className property
// javascript var your_node = document.getElementById('node_id'); your_node.className = 'foo'
That should trigger only one repaint/reflow