JSFiddle - React, Tailwind, and code Playground
by wwt
HTML
<script src="https://code.jquery.com/jquery-1.12.0.min.js"></script>
<script src="https://code.jquery.com/ui/1.11.4/jquery-ui.min.js"></script>
<link rel="stylesheet" href="https://code.jquery.com/ui/1.11.4/themes/black-tie/jquery-ui.css">
<div id="modal" style="display: none;">loading...</div>
<a href="#" class="ajax">click me</a>
JavaScript
$('.ajax').on('click', function(){
$.post({
url: '/echo/html/',
data: {
html:'<div style="width: 300px;">new valuenew valuenew valuenew valuenew valuenew valuenew valuenew valuenew valuenew valuenew valuenew valuenew valuenew valuenew valuenew valuenew valuenew valuenew valuenew valuenew valuenew valuenew valuenew value</div>',
delay: 3
},
beforeSend: function(){
$('#modal').dialog({
modal: true,
width: 'auto',
height: 'auto'
});
},
success: function(data){
$('#modal')
.html(data)
.dialog('option', 'position', { my: "center", at: "center", of: window });
}
});
return false;
});