Bootstrap 3, data-show not working
If data-show="true"
, then when you call $('.modal').modal()
, the modal shows up. But if data-show="false"
, $('.modal').modal()
doesn't work, you need to call $('.modal').modal('show')
instead.
It's actually not a bug because the documentation says:
Shows the modal when initialized.
Therefore you need to initialize your Modal "manually" by JS:
<script type="text/javascript">
$( function(){
$('#myModal').modal();
} )
</script>