[jQuery] Re: HTML returned from GET: What's the best solution to this issue?
Still looking to see if this is possible. My solution (not very elegant) was to replace paragraph tags with br / tags, then split on the br / tag like so: html head title/title /head body br /br / this is the first paragraph... br /br / this is the second paragraph... br /br / /body /html That works just fine, but I'd really love to be able to generate a jQuery object from text. It would be much simpler than my solution I'm sure. You can see what I came up with here: http://www.commadelimited.com/code/fillertext/
[jQuery] Re: HTML returned from GET: What's the best solution to this issue?
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?
[jQuery] Re: HTML returned from GET: What's the best solution to this issue?
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?
[jQuery] Re: HTML returned from GET: What's the best solution to this issue?
dude... what the hell is that! LOL! :o) On 10/7/07, 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? -- http://cjordan.us
[jQuery] Re: HTML returned from GET: What's the best solution to this issue?
:) It's filler text. You've probably seen the fake Latin text lorem Ipsum It's just meant to be text put into a text box or whatever to take up visual space. On Oct 7, 9:39 pm, Christopher Jordan [EMAIL PROTECTED] wrote: dude... what the hell is that! LOL! :o) On 10/7/07, 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? --http://cjordan.us- Hide quoted text - - Show quoted text -
[jQuery] Re: HTML returned from GET: What's the best solution to this issue?
Oh... okay. I was thinkin' I'd have to see whatever site was going to use that content! :o) On 10/7/07, Andy Matthews [EMAIL PROTECTED] wrote: :) It's filler text. You've probably seen the fake Latin text lorem Ipsum It's just meant to be text put into a text box or whatever to take up visual space. On Oct 7, 9:39 pm, Christopher Jordan [EMAIL PROTECTED] wrote: dude... what the hell is that! LOL! :o) On 10/7/07, 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? --http://cjordan.us- Hide quoted text - - Show quoted text - -- http://cjordan.us
[jQuery] Re: HTML returned from GET: What's the best solution to this issue?
Here it is: http://www.commadelimited.com/code/fillertext/ On Oct 7, 9:49 pm, Christopher Jordan [EMAIL PROTECTED] wrote: Oh... okay. I was thinkin' I'd have to see whatever site was going to use that content! :o) On 10/7/07, Andy Matthews [EMAIL PROTECTED] wrote: :) It's filler text. You've probably seen the fake Latin text lorem Ipsum It's just meant to be text put into a text box or whatever to take up visual space. On Oct 7, 9:39 pm, Christopher Jordan [EMAIL PROTECTED] wrote: dude... what the hell is that! LOL! :o) On 10/7/07, 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? --http://cjordan.us-Hide quoted text - - Show quoted text - --http://cjordan.us- Hide quoted text - - Show quoted text -