I don't want to remove the Span I just want to filter the text before
the Span ...
Pedram
On Sep 28, 10:22 pm, MorningZ <morni...@gmail.com> wrote:
> this is TOTALLY untested, but should work
> $("p").click(function() {
> var txt =$(this).html();
> txt = $(txt).find("span").remove().text();
> alert(txt);
> );
>
> On Sep 28, 2:13 pm, pedram...@gmail.com 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 ?
No comments:
Post a Comment