"Demo button Modal - Moodle 3.3+ WIP"
Bootstrap 3.0.0 Snippet by dgcruzing

<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="container"> <div class="row"> <h2>Working sample</h2> </div> </div> <div class="editor-indent" style="margin-left: 20px; padding: 0 0 0 40px; margin-right: 50px"> <button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">Launch demo modal</button> <!-- Modal --> <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;"> <div class="vertical-alignment-helper"> <div class="modal-dialog vertical-align-center"> <div id="modal-content" class="box modal-content"><div id="modal-header" class="box modal-header"> <h4>Confirm</h4></div><div id="modal-body" class="box modal-body"><p>Confirm deletion of this page</p></div> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">X</span><span class="sr-only">Close</span> </button><div id="modal-footer" class="box modal-footer"></div></div></div></div></div>
.modal { } .vertical-alignment-helper { display:table; height: 100%; width: 100%; } .vertical-align-center { /* To center vertically */ display: table-cell; vertical-align: middle; }

Related: See More


Questions / Comments: