Alertify ライブラリを使用して JavaScript でダイアログ ボックスを作成しています。
alertify.myAlert || alertify.dialog('myAlert',function factory(){
return {
main:function(content){
this.setContent(content);
},
setup:function(){
return {
options:{
modal:false,
basic:true,
maximizable:false,
resizable:false,
padding:false,
visible:false
}
};
},
hooks: {
onshow: function() {
this.elements.dialog.style.height = '50%';
this.elements.dialog.style.width = '15%';
}
}
};
});
そして、以下のコードを使用して呼び出します..
alertify.myAlert("my html content");
起動したら、どうすれば閉じることができますか? alertify.myAlert.close()、alertify.myAlert.hide() などの差分の組み合わせを試しましたが、何も機能しませんでした..