var sec = ["10% bonus on your next order! use KEYCODE: TEN", "15% bonus on your next order! use KEYCODE: FIFTEEN",
"Free Shipping bonus on your next order! use KEYCODE: FREE SHIPPING", "10% bonus on your next order! use KEYCODE: TEN",
"25% bonus on your next order! use KEYCODE: TWENTY-FIVE", "Free Shipping bonus on your next order! use KEYCODE: FREE SHIPPING"];
I want to wrap a span tag around the KEYCODE: portion of the above array.
My intent is to add css to the span via a class name, I’ve tried various iterations to achieve the desired results, but to no avail, the outputted array doesn’t return with the keycode in a different color.
what am I doing wrong? or is what I am seeking to do simply not possible?
Thanks in advance for the help
I found the solution to this problem.
For anyone searching for the solution Here it was:
var sec = ["10% bonus on your next order! use" + "<span class='redBold'> KEYCODE: TEN</span>", "15% bonus on your next order! use" + "<span class='redBold'> KEYCODE: TEN</span>",
"Free Shipping bonus on your next order! use" + "<span class='redBold'> KEYCODE: TEN</span>", "10% bonus on your next order! use" + "<span class='redBold'> KEYCODE: TEN</span>",
"25% bonus on your next order! use" + "<span class='redBold'> KEYCODE: TEN</span>", "Free Shipping bonus on your next order! use" + "<span class='redBold'> KEYCODE: TEN</span>"];