Append text to dynamic list items
Hi,
I've created a dymanic list which is populated by a rest service.
If the value is undefined I hide the element using the fillowing javascript:
if (typeof value === "undefined") {
$(element).hide();
}
However, if the value is defined I'd like to add text before each list item.
For example, if the service creates a dynamic list with three items, e.g.
Oranges
Apples
Bananas
I'd like the list to display "Select" before each item:
Select Oranges
Select Apples
Select Bananas
Thanks in advance