JSFiddle - React, Tailwind, and code Playground
JavaScript
jQuery(function () {
// Dialog here
$('<form><label>gdfg</label><input type="text" style="z-index:10000" name="name"></form>').dialog({
modal: true,
buttons: {
'OK': function () {
var name = $('input[name="name"]').val();
storeData(name);
$(this).dialog('close');
},
'Cancel': function () {
$(this).dialog('close');
}
}
});
function storeData(name) {
// do whatever you want here, like an alert
alert(name);
}
});