Skip to content

Instantly share code, notes, and snippets.

@calvez
Created February 19, 2019 08:03
Show Gist options
  • Save calvez/f11336af3e241d0e32ae455969aa90bd to your computer and use it in GitHub Desktop.
Save calvez/f11336af3e241d0e32ae455969aa90bd to your computer and use it in GitHub Desktop.
don't close bootstrap 3 modal with key or click outside
<!--
source: https://stackoverflow.com/a/22208662
-->
<button data-target="#myModal" data-toggle="modal" data-backdrop="static" data-keyboard="false">
Launch demo modal
</button>`
$('#myModal').modal({backdrop: 'static', keyboard: false})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment