4
我想在某些事件後更改模態行爲。Twitter引導模態 - 對現有模態的更改選項
$('.myModal').modal('show'); // default behavior - user can close modal on ESC
$(button).click(function(){
$('.myModal').modal({keyboard:false}); // override
// prevous line code does not work as i expect,
// user can close modal with ESC
$('.myModal').data('modal').option.keyboard = false; // even this code doesn't work
});
任何幫助將不勝感激
關於使用'bs.modal'而不是'modal'的好處。這解決了我的問題 –