Edit in JSFiddle

<br/>
<a href="javascript:void(0)">void 0 link</a>

<br/>
<a href="http://lesson8.blogspot.com/">External link warning message on all 'href' links EXCEPT one?</a>
$.expr[':'].external = function (obj) {
    return !obj.href.match(/^mailto\:/) && !obj.href.match(/^javascript\:/) && (obj.hostname != window.location.hostname);
};

// Add 'external' CSS class to all external links
$('a:external').addClass('external');

$('.external').click(function () {
    var link = $(this).attr('href');

    $('<div>By clicking \'Okay\' you will be transferred to a web site not controlled by ' + link + '.<br /> <strong>Are you sure you want to proceed?</strong></div>').dialog({
        title: "External Link",
        modal: true,
        overlay: {
            backgroundColor: '#000',
            opacity: 0.5
        },
        buttons: {
            'Okay': function () {
                $(this).dialog('close').remove();
                window.open(link);
            },
                'Cancel': function () {
                $(this).dialog('close').remove();
                return false;
            }
        }
    });

    return false;
});