有人可以幫我添加一個類到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