I'm currently working on a project where I need to set up a modal popup using bootstrap. The website I'm working on is organized by departments, so the only part of the code that I have control over is the main body of the site. I have included the bootstrap.js file and jquery, and I am following the example code provided in the bootstrap documentation. The tooltips and popovers are working fine, but for some reason, I can't get the modal to work.
<!-- Button to trigger modal -->
<a href="#myModal" role="button" class="btn" data-toggle="modal">Launch demo modal</a>
<!-- Modal -->
<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="myModalLabel">Modal header</h3>
</div>
<div class="modal-body">
<p>One fine body…</p>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
<button class="btn btn-primary">Save changes</button>
</div>
</div>
When I click the button, the page darkens as if the modal is there, but in reality, all I see is the navigation bar (which I can't edit) and the modal dialog that I created (#myModal) is not displayed. I'm really confused as this is one of my first web development projects.
I would like the modal button to appear after a select element within a form.
<select class="bootstrap-select" name=display>
<?php foreach ($digitalSignageDisplays as $display) { ?>
<option value=<?php echo $display; ?>><?php echo $display; ?></option>
<?php } ?>
</select>
I would really appreciate any help or guidance. Could it possibly be a Z-index issue?