I’m trying to create a simpleDialog2 using the code below:
function deleteItem(itemID) {
$('<div>').simpledialog2({
mode: 'button',
headerText: 'Are you sure?',
headerClose: true,
// buttonPrompt: 'Please Choose One',
buttons : {
'Delete': {
click: function () {
//$('#buttonoutput').text('OK');
}
},
icon: "delete",
'Cancel': {
click: function () {
// $('#buttonoutput').text('Cancel');
},
theme: "c"
}
}
})
}
And I get this error every time TypeError: 'undefined' is not a function (evaluating '$('<div>').simpledialog2') And help you can provide would be most appreciated.
My issue was actually that I hadn’t imported the simpleDialog2 statements in the correct order, as this page outlines.