0
我在一個頁面上有兩個模態。第一個邊框在.ui-widget-content
類中的jquery.ui.theme.css
文件中定義。在jquery模態對話框中定義了ui-widget-content的邊框
有沒有辦法添加一個樣式屬性並覆蓋由css文件定義的樣式?
我想第二個模式有不同的顏色邊框。
這裏是我的div:
<div id="dialog-modal" title="Discharge Warning">
<p>Are you sure you want to discharge this Patient</p>
</div>
這裏是jQuery的爲我的第二個模式:
$('#dialog-modal').dialog(
{
modal: true,
autoOpen: false,
resizable: false,
draggable:false,
show:
{
effect:"blind",
duration:500
},
buttons:
{
'discharge':
{
text: 'Discharge Patient',
click: function() { $('#DischargeReferralForm').submit(); },
class: 'btn purple',
style: 'font-family: "Segoe UI", Helvetica, Arial, sans-serif'
}
},
});
$('.ui-dialog-buttonpane')
.find('button:contains("Discharge")')
.prepend('<i class="icon-ok"></i>');
$('#DischargeMgs').click(function() { $("#dialog-modal").dialog("open"); });
FYI:頁面檢查跟蹤的顏色回ui-widget-content類。
http://stackoverflow.com/questions/ 12843647 /改變顏色的jqueryui對話框關閉x http://stackoverflow.com/questions/1308369/jquery-ui-dialog-individual-css-styling 可能這些可以給你一些想法。 –