mardi 27 janvier 2015

Uncaught TypeError: Cannot read property 'createDocumentFragment' of undefined

I am trying to grab a webpage and load into a bootstrap 2.3.2 popover. So far I have:



$.ajax({
type: "POST",
url: "AjaxUpdate/getHtml",
data: {
u: 'http://ift.tt/gbk8l4'
},
dataType: 'html',
error: function(jqXHR, textStatus, errorThrown) {
console.log('error');
console.log(jqXHR, textStatus, errorThrown);
}
}).done(function(html) {
console.log(' here is the html ' + html);

$link = $('<a href="myreference.html" data-html="true" data-bind="popover"'
+ ' data-content="' + html + '">');
console.log('$link', $link);
$(this).html($link);

// Trigger the popover to open
$link = $(this).find('a');
$link.popover("show");


When I activate this code I get the error in the title. What is the problem here and how can I fix it?


Here's a fiddle:


http://ift.tt/1D4VXUR


Aucun commentaire:

Enregistrer un commentaire