Ooooh...I like it. I'll give that a shot, thanks! 

-----Original Message-----
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of rgrwkmn
Sent: Sunday, October 07, 2007 10:14 PM
To: jQuery (English)
Subject: [jQuery] Re: HTML returned from GET: What's the best solution to
this issue?


$.get is the Ajax call and .find gets all the p tags. They pretty much do
all the work for you. I'm using .appendTo() as an example of something you
could do with this.

$.get("hillbilly.html", function(data){
                $(data).find('p').appendTo('#someId');
                });

Once the data is in something you can get it all again the same way:
$('#someId').find('p')       or       $("#someId > p")

On Oct 7, 9:30 pm, Andy Matthews <[EMAIL PROTECTED]> wrote:
> Just a clarification...I really just want to be able to pass in a 
> string of text, from any source, and create a valid jQuery object from 
> it. In this case, this is the string that I'm going to be using:
>
> http://www.commadelimited.com/code/fillertext/hillbilly.html
>
> I want to isolate the <p> tags into a jQuery object.
>
> On Oct 7, 7:46 pm, Andy Matthews <[EMAIL PROTECTED]> wrote:> I'm 
> building a little app that will read in a page of static HTML. I'd
> > like to take the string that's returned from the get() call and 
> > parse through it, dumping only the paragraphs into a jQuery object 
> > with a length of 40.
>
> > What's the best approach to this?


Reply via email to