I have a page with some HTML on which I need to get hold of to wrap an additional span tag around with a class on it.
<span class="VIEWBOX" id="_Datacomp_c_importantnote">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. vestibulum vel tellus. Morbi suscipit enim ac <BR>
</span>
I cannot use the class / ID that is in the parent span so i need to create a new one.
I have written
var innnerNoteText = $('#_Datacomp_c_importantnote').text();
innerNoteText.wrap('<span class="noteText"></span>');
But this isn’t working, any help would be great!
Try:
http://api.jquery.com/wrapInner/