I want to deal with two different modal dialogs within Twitter Bootstrap.
So the idea is that I just copy the modal dialog HTML and create a new button (BTN2) with data-toggle="modal2"
. And with a click on the new button (BTN2), the second modal dialog should show up, and not the first one.
I tried it with a click on BTN2 but none of the dialogs showed up. On the existing button (BTN1), however, both dialogs show up.
This is the current modal dialog. Yes it is based on the example provided by bootstrap.com, thus the bs-example-modal-lg class.
<div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="PodcastModal" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
<ul class="nav nav-tabs" role="tablist" id="list"></ul>
</div>
<div class="modal-body">
<div id="items"></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">Done!</button>
</div>
</div>
</div>
</div>
This is the button to call the modal dialog.
<div class="btn-group">
<button type="button" class="btn btn-primary" data-toggle="modal" data-target=".bs-example-modal-lg">
<span class="glyphicon glyphicon-plus"></span> <span class="hidden-xs">Add</span>List</button>
</div>