to get it outside of the mmenu "pagedim" blocker
var $profileModal = $('#profile-bio-modal').detach();
$('body').append($profileModal);
var $modalBody = $profileModal.find('.modal-body');
$('#profile-bio-link').on('click', function(e) {
e.preventDefault();
// Make the Ajax call once...
if ($modalBody.find('> .profile-bio-box').length === 0) {
$modalBody.load($(this).attr('href'), function() {
// Wait until the Ajax call has completed before showing the modal dialog
$profileModal.modal();
});
} else {
$profileModal.modal();
}
});
});
})(jQuery);