The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Her is my html
I want to refer to the italic text (target-text) and change it(and only that) to something else like “new-text”.
Is it possible with jQuery?
<strong>ILS 50.00</strong> target-text<strong>ILS 50.00 לפי חודש עבור 12 חודשים נוסף</strong>. </td>
Not really clear what’s italic exactly and how that’s done. Are you using <i></i> tags?
Since nothing is wrapping the text you want to replace, it might be easiest to use a combination of jQuery and plain JS (demo)
.nextSibling.textContent = "new-text";
This method does not allow you to add new HTML.