Prevent Bootstrap Modal from disappearing when clicking outside or pressing escape

2015-05-21 20:10:05

How to close modal dialog only by close icon?

code:

If using javascript then:

[js]
$(‘#myModal’).modal({
backdrop: ‘static’,
keyboard: false
})
[/js]

and if HTML:

[html]

[/html]

Mac Terminal:zsh+oh-my-zsh

将bash切换为zsh chsh -s /bin/zsh 其实还可以用which来定位(特别是ubuntu的童鞋) chsh -swhich zsh`` 直接用zsh会很蛋疼,因为zsh功能很强大但是太复杂,所以需要oh-my-zsh来将它简单化。如果要切换回去: chsh -s /bin/bash 下载oh-my-zsh 1) 直接用git从github上面下载包: git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh 2) 备份已有的zshrc(一般不需要) cp ~/.zshrc ~/.zshrc.orig 3) 替换zshrc cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc