‘);
$content = $(‘
‘);
$close = $(‘
‘);
$modal.hide();
$modal.append($content, $close);
$(document).ready(function(){
$(‘body’).append($modal);
});
$close.click(function(e){
e.preventDefault();
$modal.hide();
$content.empty();
});
// Open the modal
return function (content) {
$content.html(content);
// Center the modal in the viewport
$modal.css({
top: event.pageY,
left: event.pageX
});
$modal.show();
};
}());
// Wait until the DOM has loaded before querying the document
$(document).ready(function(){
$(‘a#popup’).click(function(e){
modal(“
“);
e.preventDefault();
});
});