[jQuery] Re: Find() doesn't want to find anything out of the body

2008-09-24 Thread MindstormsKid
Karl Swedberg-2 wrote: > > Try this for the success parameter: > > success: function(html) { > var $html = $(html); > var title = $html.filter('title').text(); > alert(title); > } > > Basically, you have to use .filter() inste

[jQuery] Re: Find() doesn't want to find anything out of the body

2008-09-24 Thread Karl Swedberg
Try this for the success parameter: success: function(html) { var $html = $(html); var title = $html.filter('title').text(); alert(title); } Basically, you have to use .filter() instead of .find(); Here's a demo page: http://test.learningjque

[jQuery] Re: Find() doesn't want to find anything out of the body

2008-09-23 Thread MindstormsKid
ricardobeat wrote: > > 1. I don't see the point in loading a full HTML page with ajax, you > could load snippets of HTML or XML data instead. > Well, In my case I need to... ricardobeat wrote: > > 2. You can't have text directly inside , they have to be inside > a block-level element. That's

[jQuery] Re: Find() doesn't want to find anything out of the body

2008-09-23 Thread ricardobeat
Hmm. 1. I don't see the point in loading a full HTML page with ajax, you could load snippets of HTML or XML data instead. 2. You can't have text directly inside , they have to be inside a block-level element. That's why getting a 's content works. Try doing $('body').load('test2.html') on the p

[jQuery] Re: Find() doesn't want to find anything out of the body

2008-09-23 Thread ricardobeat
If you post a link to a test page somebody might be able to help. - ricardo On Sep 23, 4:28 pm, MindstormsKid <[EMAIL PROTECTED]> wrote: > I'm making something that involves loading an HTML page with $.ajax(). I want > to get the content of the page title and the content of the body, so I did >