Ok, how about something to the effect of: $("p").each(function() { $ (this).children(":not(span)").css({color:"red"}); });
On Sep 30, 8:12 am, [EMAIL PROTECTED] wrote: > If I do this with CLone then all my prossesing is with the clone but I > need to have a selector in the Original one not in the Clone so > changing and modifying the clone is not necessary ,the only way is get > a Clone of THe Span Then Remove the Span and then get the content of > the P do some changes on it , after that add the Span again And I > think this is not the right way to Deal with this ... > I'm still working on thiws and waiting for the best way to it > Thanks Pedram > > On Sep 30, 7:36 am, equallyunequal <[EMAIL PROTECTED]> wrote: > > > $("p:not(span)") would select all paragraphs that are not spans... > > which would be all paragraphs even if they have a child that is a > > span. > > $("p :not(span)") or $("p *:not(span)") would select all paragraphs > > without child spans... which would be none of the paragraphs. > > > He needs the contents of all paragraphs minus the content of a span. > > The only way (I can think of) to non-destructively get the contents of > > an element minus some of its children is to clone it first, then > > remove the children. > > > On Sep 29, 3:33 pm, dasacc22 <[EMAIL PROTECTED]> wrote: > > > > um cant you just do something like $("p:not(span)") ?? > > > > On Sep 28, 3:48 pm, equallyunequal <[EMAIL PROTECTED]> wrote: > > > > > This should work: > > > > > var clone = $("p").clone(); > > > > clone.find("span").remove(); > > > > > clone.each( function() { console.log(this) } ); > > > > > On Sep 28, 2:13 pm, [EMAIL PROTECTED] wrote: > > > > > > Hi Guys, > > > > > > this is the Code which I am working on > > > > > > <p> > > > > > Data which I need to select and it hasn't an attribute > > > > > <span> Data in a Span </span> > > > > > </p> > > > > > <p> > > > > > Data which I need to select and it hasn't an attribute > > > > > <span> Data in a Span </span> > > > > > </p> > > > > > <p> > > > > > Data which I need to select and it hasn't an attribute > > > > > <span> Data in a Span </span> > > > > > </p> > > > > > How could FIlter and Select the text Before the <span> > > > > > does someone has an Idea ?