JSFiddle - React, Tailwind, and code Playground
HTML
<a href="http://somewhere.com/somepage" data-post="" rel="123" class="ajax" data-toggle="modal" data-target="#myModal">
<div class="projectinfo">
<div class="meta">
<h4>the_title goes here></h4>
<h6><em>The post goes here></em></h6>
</div>
</div>
</a>
JavaScript
jQuery(function () {
jQuery(document.body).on('click', 'a.ajax', function () {
var post_url = jQuery(this).attr("href");
var post_id = jQuery(this).attr("rel");
alert(post_url + " - " + post_id);
jQuery("#fff").html('<div class="loading">loading...</div>');
jQuery("#fff").load(post_url).fadeIn(500);
return false;
});
jQuery("a.pclose").click(function () {
jQuery("#fff").fadeOut();
});
});