JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://dev.iceburg.net/jquery/jqModal/jqModal.js"></script>
<p class="right blackout">
<a href="/passcheck" data-remote="true">Blank</a>
</p>
<p class="blackoutwindow">MODAL WINDOW</p>
CSS
.blackoutwindow {
display: none;
}
JavaScript
$(document).ready( function() {
$(document).on('click', '.blackout a', function(e) {
e.preventDefault();
alert('Initial handling'); // will not appear, this is the problem
});
$('.blackoutwindow').jqm({
modal: true,
onShow: function() {
alert('calling /passcheck'); //will be called
$.get($(this).attr('href'));
},
trigger: '.blackout',
overlay: 100
});
});