I have to create a function that accepts two parameters a selector and a string which will put each individual word within the text content of the selected element inside a new 'span' element. Each new 'span' element must be given a unique ID, formed by combining the prefix and a sequential integer (e.g. par0, par1 etc.). Also the function needs to handle the nested child elements...
Any help of creating this will be highly appreciated.