I want to do a very easy task to replace the head of a node page with the head of a node page called by ajax call.
I do it like this:
url = 'http://myurl';
$.get(url, function(results){
var head = $('head', results);
$('head', results).each (
function() {
alert("got a match ");
});
var form = $("form.ajax_form_result", results);
$('head').html(head);
$('#ajax_form_result').html(form);
}, "html");
Form updates work without problems, but chapter updates do not work. $ ("head", results); does not return node, which leads to an empty head in a new document.
source
share