className in contrast, has the same stuff in one string with the elements separated by spaces. className should be identical to what's in the inline class parameter at the HTML tag. Add on classes at className and not classList.
this.whatever.parentElement.className =
this.whatever.parentElement.className + ' foo';
No comments:
Post a Comment