[thelist] DOM: removing appended text

Matt Warden mwarden at gmail.com
Fri Dec 9 15:51:21 CST 2005

On 12/9/05, fstorr <fffrancis at fstorr.demon.co.uk> wrote:
> Hi Matt
> Thanks for this.  What I've got is this:
> <p id="quoteename">Thank you for submitting a quote for </p>
> And it's this <p> that I'm appending text to and that I also want to
> remove the appended text from, rather than the entire contents of the
> <p> tag.

There are a lot of ways to do this. You could include this text in a
span. However, I think the cleaner way to do it is to just append a
text node with "Thank you for submitting a quote for " after you
remove the text node as I demonstrated in my example. Otherwise you
are including markup for a functional purpose, and purists might beat
you with a trout.

Matt Warden
Miami University
Oxford, OH, USA

This email proudly and graciously contributes to entropy.

More information about the thelist mailing list