That's not your jQuery event callback function anymore, but the bootbox callback... try $.proxy
to bind the context:
$(document).on("click", ".alert", function(e) {
e.preventDefault();
bootbox.confirm("Are you sure?", $.proxy(function(result) {
if (result) {
document.location.href = this.href;
}
}, this));
});