有人可以帮我添加一个类到ui-dialog-buttonset ..我有2个按钮“添加”和“删除”,并希望每个适当的样式。addClass与ui-dialog按钮的问题
我如何添加一个类,上面写着 '添加此项目' 按钮
$dialogContent.dialog({
modal: true,
resizable: false,
title: "New thing",
close: function() {
$dialogContent.dialog("destroy");
$dialogContent.hide();
$('#other').stuff("removeUnsavedEvents");
},
buttons: {
'Add this item' : function() {
if(client_url.val() == '')
{
alert('client not selected');
$other.stuff("removeUnsavedEvents");
$dialogContent.dialog("close");
return;
}
$dialogContent.dialog("close");
},
});
update_stuff_overview();
}
}
}
感谢
编辑从UI的对话框插件添加HTML ..
<div class="ui-dialog-buttonset">
<button type="button" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" role="button">
<span class="ui-button-text">Add this item</span>
</button>
</div>
我试图在上面的按钮中添加“new_class”。
请张贴您在此页面使用的所有HTML,JS。 – 2012-04-10 04:52:38
没有HTML去与此。仅此一点就是添加那个读取'Add this item'的特定按钮。 jquery ui-dialog函数自己添加按钮。 – Josh 2012-04-10 05:00:00