4
我想在jQuery對話框上的按鈕(特別是包含單詞「或」)的按鈕之間添加一些自定義HTML。將自定義HTML添加到jQuery對話框按鈕窗格
的JavaScript我已經是這樣的:
$("#foo").dialog({
autoOpen: false,
width: 600,
modal: true,
resizable: false,
buttons: {
save: { text: 'Save', class: 'form-finish form-submit', click: function() {
…
}
},
cancel: { text: 'Cancel', class: 'form-cancel', click: function() {
$(this).dialog("close");
}
}
}
});
它產生的HTML是這樣的:
<button class="form-finish form-submit ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" type="button" role="button" aria-disabled="false"><span class="ui-button-text">Save</span></button>
<button class="close cancel ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" type="button" role="button" aria-disabled="false"><span class="ui-button-text">Cancel</span></button>
我想是這樣的:
<button class="form-finish form-submit ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" type="button" role="button" aria-disabled="false"><span class="ui-button-text">Save</span></button>
<span class="article">or</span>
<button class="close cancel ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" type="button" role="button" aria-disabled="false"><span class="ui-button-text">Cancel</span></button>
有什麼如何在不破解jQuery UI的核心的情況下做到這一點?謝謝!
當然。謝謝! – thebluelizard 2012-01-30 20:11:10