JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/themes/base/jquery-ui.css">
<a href="http://www.google.com" class="external">Google</a>
JavaScript
$( function()
{
$( 'a.external' ).click( function( e )
{
$link = $( this );
$( '<div>This link is external. Are you sure you wish to continue?</div>' ).dialog( {
buttons: {
Ok: function()
{
window.open( $link.attr( 'href' ) );
$( this ).dialog( 'close' );
},
Cancel: function()
{
$( this ).dialog( 'close' );
}
},
close: function()
{
$( this ).dialog( 'destroy' );
},
draggable: false,
modal: true,
resizeable: false,
title: 'Please Confirm'
} );
e.preventDefault();
} );
} );