I'm using fancybox2 to open a new html. Here I generate html through jquery ajax method. But fancybox2 don't respond. Here is the code
var Line = $.ajax({ type: "GET",
url: "/ajaxHTML",
dataType: 'html',
success: function(result){alert(result);},
}).responseText;
$.fancybox.open({ 'content' : Line}, {type: 'html'});
Am I using it wrongly? I can open fancybox with simple text or html code. But not with this responseText variable. And ajax can get html successfully. Alert function works and shows the content of whole html page.