maxWidth: true,
minHeight: true,
minWidth: true
+ },
+ // support for jQuery 1.3.2 - handle common attrFn methods for dialog
+ attrFn = $.attrFn || {
+ val: true,
+ css: true,
+ html: true,
+ text: true,
+ data: true,
+ width: true,
+ height: true,
+ offset: true,
+ click: true
};
$.widget("ui.dialog", {
{ click: props, text: name } :
props;
var button = $('<button type="button"></button>')
- .attr( props, true )
- .unbind('click')
.click(function() {
props.click.apply(self.element[0], arguments);
})
.appendTo(uiButtonSet);
+ // can't use .attr( props, true ) with jQuery 1.3.2.
+ $.each( props, function( key, value ) {
+ if ( key === "click" ) {
+ return;
+ }
+ if ( key in attrFn ) {
+ button[ key ]( value );
+ } else {
+ button.attr( key, value );
+ }
+ });
if ($.fn.button) {
button.button();
}