This is not a direct answer, but it can help clarify the situation.
The data parameter of the callback function can be turned into a jQuery (1.6.2) $ (data) object, which contains various parts of the HTML response:
- Material that precedes the actual document, such as a doctype declaration, or uninformed white space text fields.
- The content of the head element.
- The content of the body element.
The html, head and body elements are not in the data object. Since the number of elements contained in the head and body may vary, you should not get them by indexing, like $ (data) [2]. Instead, apply a filter to this object, for example:
$.get( uri, function(data, textStatus, jqXHR){ var $doc = $(data); var title = $doc.filter('title').text();
After filtering the correct elements, you can apply additional selectors using find ().
Unfortunately, in IE, header elements are not part of $ (data). I have no idea why this is.
rakensi Mar 07 '12 at 10:15 2012-03-07 10:15
source share