Scantraxx,
<!DOCTYPE html>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<style type="text/css">
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css">
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
<script>
$(function() {
$.ajaxSetup({cache:false});
$(".viewDialog").on("click", function(e){
e.preventDefault();
e.stopPropagation();
$("<div></div>")
.addClass("dialog")
.appendTo("body")
.dialog({
title: $(this).attr("data-dialog-title"),
close: function() {$(this).remove() },
modal: false
})
// .load(this.href);
});
$(document).on("click", function(e) {
$(e.target).closest(".ui-dialog").length || $(".dialog").dialog("close");
})
});
</script>
</head>
<body>
<a href="" class="viewDialog" data-dialog-title="1">1</a>
<a href="" class="viewDialog" data-dialog-title="2">2</a>
<a href="" class="viewDialog" data-dialog-title="3">3</a>
<a href="" class="viewDialog" data-dialog-title="4">4</a>
<a href="" class="viewDialog" data-dialog-title="5">5</a>
</body>
</html>