How to add addclass?

switch (el.offerstatus) {
 case 0:
 statusText = 'Sent';
 case 1:
 statusText = 'Sent';
 case 2:
 statusText = 'Error';

As each status and add a certain addClass?
July 9th 19 at 11:22
2 answers
July 9th 19 at 11:24
Only I don't understand the question? What do you mean add the addClass?
how to add to the text, "statusText = 'Sent';" div class? - Vickie commented on July 9th 19 at 11:27
: for textNode makes no sense to add css - Nash_Marv commented on July 9th 19 at 11:30
July 9th 19 at 11:26
Probably meant class for each status. Then you need statusClass = x.

Find more questions by tags JavaScript