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(){

        $.ajax({
            url: '/',
            beforeSend: function(){

                

            },
            success: function(data){
								$('#modal').dialog({
                		autoOpen: false,
                    modal: true,
                    width: 'auto',
                    height: 100
                });
                $('#modal')
                .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>')
                .dialog('open');
            }
        });

        return false;

    });