For example, I am using the following function:
$ ('body')
). Html (function (i, html) {var arr = html.split ("."); Arr [arr.length-1] = "& lt; span class = 'findme' & gt;" + arr [arr.length -1] + "& lt; / span & gt; & quot;;; Warning (AR) returns arr.join (". ");});
The problem is that the cursor is transferred from where the user was typing. Are you essentially resetting all of this by setting HTML to any element?
Use the DOM API, as it was intended to do.
It looks like you want & lt; Span & gt; Wrap the content after the last duration in the page with , to properly do it, you need to check the dome for the text nodes in which the duration is and then & lt; Span & gt; Replace the last-found text node with the element
Comments
Post a Comment