You should just copy code from example. Your code has lack of buttons identifiers
buttons: {
"Yes": function () {
$(this).dialog('close');
callback(true);
},
"No": function () {
$(this).dialog('close');
callback(false);
}
}
and for some reason, in your code buttons
is array and in example it is object. Also, you have undefined value of bender
, you should create object before fill it
var bender = {};