I am trying to use a modal on my application and something weird is going on. When I press the button to open the modal, it pops up and disappears right away. I can see the modal content for a second before it closes. Here is my code for the basic modal:
<button class="btn btn-primary" type="button" data-toggle="modal" data-target="#myModal">Upload Images</button> <div class="spacer"></div>
<textarea class="autosize-transition form-control" placeholder="Please enter information." id="form-field-11" style="overflow: hidden; word-wrap: break-word; resize: horizontal; height: 200px; width: 720px"></textarea>
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<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">
This is where you insert the content you want to display in the modal.
</div>
<div class="modal-footer">
<!-- footer area with buttons for a continued dialog -->
<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 -->
am I using a class that makes this happen? I have no idea why this behaves the way it does and I hope my question is clear enough for you pro's to dissect it and help me out. Thanks to anyone in advance who knows why my modal closes right when I open it.