JSFiddle - React, Tailwind, and code Playground

HTML

<link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
<div class="selector">
    <div id="divInDialog"></div>
</div>
<button id="opener">Open Dialog</button>

JavaScript

$(function(){
    $( ".selector" ).dialog({
       'autoOpen':false,
       open: function(event, ui) {
         $('#divInDialog').load('popup.html', function() {
           alert('Load was performed.');
         });
       }
    });
    
    $( "#opener" ).click(function() {
          $( ".selector" ).dialog( "open" );
    });

});