I would stop using the unobtrusive since it seems to be failing at it's primary goal: being unobtrusive!
Instead, use the jQuery ajax method. Here's a sample fiddle: http://jsfiddle.net/VM4HH/
And here's the snippet of code that's making the anchor functionality work:
$(function() {
$('body').on('click', 'a.confirm', function(e) {
e.preventDefault();
var $tar = $(e.target);
customConfirm($tar.data('confirm'), function() {
var $contentTarget = $('#' + $tar.data('custom-ajax-target-id'));
$contentTarget.html('Loading...');
$.ajax({
url: $tar[0].href,
// Following two lines for the JSFiddle demo only
type: 'POST',
data: { html: '<h1>' + $tar.html() + '</h1>', delay: 1 }
}).success(function(data) {
$contentTarget.html(data);
});
// You'll want to attach error handlers here to your promise
});
});
});
Here's the sample HTML:
<a href="/echo/html/" data-confirm="Go to Google?" data-custom-ajax-target-id="content" class="confirm">Googs</a><br />
<a href="/echo/html/" data-confirm="Go to Yahoo?" data-custom-ajax-target-id="content" class="confirm">Yahoo</a><br />