dialog()
ダイアログボックスを表示する jQuery-UI[efn_note]dialog() – jQuery UI[/efn_note] ウイジェット。
obj.dialog({
"position":{"my":"center", "at":"center", "of":window},
"modal":true,
"buttons":[
{
"text":"保存",
"click":function(){ }
},
{
"text":"キャンセル",
"click":function(){ $(this).dialog("close"); }
}
]
);| オプション名 | 初期値 | 備考 |
|---|---|---|
| autoOpen | true | 定義時に開くかどうか |
| buttons | [] | ボタン定義 |
| closeOnEscape | true | ESC でダイアログを閉じるかどうか |
| draggable | true | タイトルバーをドラッグしてダイアログ全体を移動させるかどうか |
| height | auto | 高さ |
| hide | null | 閉じる時のエフェクト定義 |
| maxHeight | false | 最大高さの指定 |
| maxWidth | false | 最大幅の指定 |
| minHeight | 150 | 最小高さの指定 |
| minWidth | 150 | 最小幅の指定 |
| modal | false | 開いたときモーダル(ダイアログ外の作業をロックする)にするか |
| position | { my: “center”, at: “center”, of: window } | 開く位置 my:”center” … ダイアログの中央を of:window … 画面の at:”center” … 中央 に合わせる |
| resizable | true | ダイアログサイズを変えられるようにするか |
| show | null | 開くときのエフェクト定義 |
| title | タイトル。title 属性がある場合、それが表示される。 |
Tips
スタイルの変更
.ui-widget-overlay {
background: #AAA; /* 背景色の初期値 */
opacity: .3; /* 透明度 */
}