When I try to run this code from
http://binarykitten.jkrswebsolutions.co.uk/2009/01/21/jquery-plugin-ajax-head-request/comment-page-1
using google.load() I get a jQuery not found error. However, when I
call the jQuery directly from
http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js
it works fine. Any thoughts?
jQuery.extend({
head: function( url, data, callback ) {
if ( jQuery.isFunction( data ) ) {
callback = data;
data = {};
}
return jQuery.ajax({
type: "HEAD",
url: url,
data: data,
complete: function (XMLHttpRequest, textStatus) {
var headers = XMLHttpRequest.getAllResponseHeaders().split
("\n");
var new_headers = {};
for (key in headers) {
if (headers[key].length != 0) {
header = headers[key].split(": ");
new_headers[header[0]] = header[1];
}
}
if (jQuery.isFunction(callback)) {
callback(new_headers);
}
}
});
}
});
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google AJAX APIs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-AJAX-Search-API?hl=en
-~----------~----~----~----~------~----~------~--~---