Issue
I want to do this:
e.className = t;
Where t is the name of a style I have defined in a stylesheet.
Solution
If e
is a reference to a DOM element and you have a class like this: .t {color:green;}
then you want reference the class name as a string:
e.className = 't';
Answered By - jonah
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.