I am setting an element in an array like this:
dialogs[id] = $.modal({
title: "Admin",
closeButton: true,
content: content,
width: false,
resizeOnLoad: true,
buttons: {
'Close': function (win) {
win.closeModal();
}
}
}).find('form') // Attach logic on forms
.submit(formSubmitHandler)
.end();
Later on I check if exists like this:
if (!dialogs[id]) {
loadAndShowDialog(id, link, url);
}
How can I remove the id
record from the dialogs array? Is there something like a dialogs[id].Remove()
?