Try loading your page in an iframe using jQuery UI:
$(".modal").on("click", function (event) {
event.preventDefault();
//console.log('click'); TO CHECK IF CLICK IS DETECTED
var iframe = $('<iframe frameborder="0" marginwidth="0" marginheight="0" width="600" height="400"></iframe>');
var dialog = $("<div></div>").append(iframe).appendTo("body").dialog({
autoOpen: false,
modal: true,
resizable: false,
width: "auto",
height: "auto",
close: function () {
iframe.attr("src", "");
}
});
var src = $(this).attr("href");
iframe.attr({
src: src
});
dialog.dialog("option", "title", "Your Title...").dialog("open");
});
PS: This works on any link with the class modal.