Cannot call method createDocumentFragment of undefined Cannot call method createDocumentFragment of undefined jquery jquery

Cannot call method createDocumentFragment of undefined


Please, read this Documentation: content type

You could not use json as html. You should wrap json to html.What You could do?

Something like this:

$.magnificPopup.open({  items: {    src: '<div class="white-popup">Dynamically created popup</div>', // can be a HTML string, jQuery object, or CSS selector    type: 'inline'    callbacks: {      open: function() {       $.getJSON("/index.json").done(function( data) {             data.each( function(index, value) {               $("div.white-popup").append(value);                       });              })       },      close: function() {           // Will fire when popup is closed       }});

I hope it help.