I'm using Bootstrap 3 (full version) and I use bootstrap modal in my code:
<a data-toggle="modal" data-target="deleteMessage" class="btn btn-danger btn-sm"><span class="glyphicon glyphicon-remove"></span> Удалить</a>
<!-- Modal -->
<div id="deleteMessage" class="modal fade in" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title">Modal title</h4>
</div>
<div class="modal-body">
...
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
This code I copied from official docs, but it's not working, modal window does not display.
Whats the problem?
Many thanks.
You forgot to include
#
intodata-target
attributeLive DEMO
Try to change your anchor code into:
It looks like there is a typo in the tutorial, there should be additional "#" in the
data-target
attribute.