when I try to add a class to the buttons in my dialog it pulls in other buttons. Code:
$("#selectAddressForm").dialog({
title: "Please Select an option",
buttons: [
{
text: "Cancel",
"class" : "first-button",
click: function() {$(this).dialog('close');}
},
{
text: "Select",
"class" : "second-button",
click: function() {
bindCityStateDialog(cityState);
$(this).dialog('close');
}
}
],
resizable: false,
width: 'auto',
});
When I run the code it adds in three extra buttons" find, findIndexOf, findByProperty. These are functions created in my ArrayUtils.js but I'm not even making any reference to them in the js file that I'm calling my dialog.
If it makes any difference I'm using jquery v1.4.2 and jquery-ui-1.8.6.
Thanks in advance, everyone.
This looks like a tough one.
I can't remember ever having used the class
option. And I don't know if it really exists. I can, however, remember having used the icons
option in a similar way you did. And it worked.
As you said, a custom method of yours may cause the problem. I would try and find out if this method is being called by printing out the stack trace. This might tell you if the suspected method is being called by the jQuery Dialog widget.