JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://cheapgamessales.com/drop.js"></script>
<button>Append open_dia</button>
<div class='area'></div>
CSS
th {
border:1px solid #222;
}
.yellow {
background:yellow
}
JavaScript
var loading = $('<img src="http://upload.wikimedia.org/wikipedia/commons/4/42/Loading.gif" alt="loading" class="loading">');
$(document).ready(function () {
$('button').click(function () {
$(this).next('.area').append('<a class="open_dia" title="this title" href="#">Click</a>');
});
$(document).on('click', '.open_dia', function (evt) {
var dialog = $('<div></div>').append(loading.clone());
dialog.load($(this).attr('href') + ' #content').dialog({
title: $(this).attr('title'),
width: 500,
height: 300
});
dialog.dialog('open');
return false;
});
});