JSFiddle - React, Tailwind, and code Playground
JavaScript
$(document).ready(function () {
var content = "Educate customer that the technician is needed to fix the issue. Enter TC work order #:";
var title = "Trouble Call";
var form = $("<div>" + content + "</div>", {
id: "form"
});
var inputBox = $("<input>")
.attr({
"type": "text"
});
form.append(inputBox)
.dialog({
buttons: {
'Continue': function () {
if ($("input").val()) {
alert('Continue clicked!')
} else {
alert("input empty!");
}
},
'Back': function () {
alert('Back clicked!')
// enter dialog here or function
}
},
// dialog settings
show: 'fade',
modal: true,
title: title
});
})