You almost have it. The "each" function actually returns the "raw" DOM element so to use jQuery you'll need to "enclose" this.
Just replace the core with: var $this = $(this); $this.html( $this.html().replace(/index.cfm?a=wiki&tag=/gi, "") ); Karl Rudd On 2/28/07, Yansky <[EMAIL PROTECTED]> wrote: > > I have many of the following type of links on a page: > < a > href="htp://foo.com/index.cfm?a=wiki&tag=abc"><span>htp://foo.com/index.cfm?a=wiki&tag=abc</span> > > I'm trying to remove the text in between the span tags so that only the text > after http://foo.com/index.cfm?a=wiki&tag= is showing. I have tried the > following, but it doesn't seem to work. > > $('a > span').contains('index.cfm?a=wiki&tag=').each(function(i){ > this.text().replace(/index.cfm?a=wiki&tag=/gi, ""); > }); > > Can anyone point me in the right direction? > Cheers. > -- > View this message in context: > http://www.nabble.com/Replace-text-in-array-tf3308186.html#a9201977 > Sent from the JQuery mailing list archive at Nabble.com. > > > _______________________________________________ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/