JSFiddle - React, Tailwind, and code Playground

by Rich Costello

HTML

<link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css">
<script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script>
<a href="http://www.cnn.com" class="customClick" data-str="0">Test</a>

JavaScript

$('.customClick').on('click', function () {
    var str = $(this).attr('data-str');
    str = (str == '0') ? 'You are now leaving a United Soybean Board site. Click OK to proceed or Cancel to stay on SoyConnection.com' : str;

    return (confirm(str)) ? true : false;
});