JSFiddle - React, Tailwind, and code Playground

HTML

<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css">
<script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>
    <button id="btnOld" type="button">Old API</button>
    &nbsp;&nbsp;
    <button id="btnNew" type="button">New Feature</button>

JavaScript

$.widget('sample.dialog', $.ui.dialog, {
    _create: function() {
        this.options.title = 'Overrided title';
        this._super("_create");
    }
});

$('#btnOld').click(function() {
    alert('old');
    $('<div></div>')
        .appendTo('body')
        .dialog({ title: 'Some title' });
});
    
$('#btnNew').click(function() {
    alert('new');
    $.ui.dialog({ title: 'Some title' });
});