changing CSS class dynamically in ie6?

lozina

Lifer
Sep 10, 2001
11,711
8
81
I need to change the css class of a span element dynamically so the text looks different on certain triggers.

I was testing in firefox using setAttribute('class', '(new class name)') and it works fine but as soon as I go into ie6 it's like ie6 does not honor class changes by this code...

any workaround ?
 

lozina

Lifer
Sep 10, 2001
11,711
8
81
ok I see now... the word 'class' is reserved word so they had to use 'className' instead. setting that attribute works now