Assuming you have an ordered or unordered list (ul or ol) with li items that you want to wrap within span elements using JavaScript, you can use the following code:
index.tsx495 chars18 linesThis code will loop through each li item in the list, create a new span element, move the contents of the li item into the new span element, and replace the li item with the new span element.
gistlibby LogSnag