JSFiddle - React, Tailwind, and code Playground
HTML
<div id="example a">hello</div>
JavaScript
$(document).ready(function() {
// As soon as the page loads, attach a div for showing content:
$('body').append('<div id="dialogPopup"></div>');
// Setup the dialog:
$('#dialogPopup').dialog({
width: 500,
height: 300,
autoOpen: false});
// Listen to ALL anchors in #example:
$('#example a').live('click', function(e) {
// Don't let the browser follow the link:
e.preventDefault();
// Store a link to the link clicked:
var obj = $(this);
// Store a link to the dialog:
var dia = $('#dialogPopup');
// Empty the content of the popup:
dia.html('');
// Load the contents into the dialog:
dia.load(obj.attr('href') + ' #content')
// Set the title:
.dialog({title: obj.attr('title')})
// Open the dialog:
.dialog('open');
});
$('#example').dataTable({
"bProcessing": true,
"bServerSide": true,
"bJQueryUI": true,
"sAjaxSource": "url.php",
"fnServerData": fnDataTablesPipeline,
"sPaginationType": "full_numbers",
});
});