I have this code:
var bt = {}
bt = {
text: "OK",
click: function () {
// Deletefunction here...
$(this).remove()
}
}, {
text: "Cancel",
click: function () {
$(this).remove()
}
}
$("#test").dialog({
title: "Confirm deletion",
width: "300px",
buttons: [bt]
})
Why do I only see the OK button, and not the Cancel button?? JSfiddle here.