2
CSSファイルを変更せずにjQueryダイアログのボタンペイントの高さを手動で調整/設定するにはどうすればよいですか?メッセージを含むDIVの高さと、Javascriptのボタン(緑色の線でマークされている)を含むDIVを調整したい。jQueryダイアログ:ボタンペインの高さを制御する方法
function showMessageDialog(title, message, width){
// create div if it doesn't exist already
if(!$("#msgDialogDiv").length) {
$("<DIV></DIV>").appendTo("body").attr("id","msgDialogDiv");
}
// set the message
$("#msgDialogDiv").html(message).css("color","red");
// show the dialog
$("#msgDialogDiv").dialog({
modal: true, resizable: false, draggable: false, title: title, width: width,
buttons: {OK: function(){$(this).dialog("close");}}
});
// This changes the height as I want.
// $("#msgDialogDiv").css({"overflow":"hidden","height":"10px"});
// this changes the font on button
//$("#msgDialogDiv").dialog("widget").find(".ui-button-text").css("font-size", "11px");
return;
}
showMessageDialog("Hello Stackoverflow!", "This is my first question on stackoverflow",400);
変更をバックポートしなくても、後でjQueryUIを更新できるようにjQueryのUIのCSSの後にロードされ、独自のCSSファイルで上書きを入れた方が良いです。 – Alnitak
@alnitak、true true – Neal
うん、私はこれをして、それは働いた。最初に、うまく働いたCSSを変更しようとしました。それから、CSSの変更をせずにhtmlの '