jquery - bootstrap modal - remote url. Can I put the whole modal element into remote.html? -
i'm using bootstrap 2.3.2. according http://getbootstrap.com/2.3.2/javascript.html#modals if data-remote url provided, content of url injected .modal-body.
my index.html:
<a data-remote="remote.php" data-target="#mymodal" 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 test 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>
remote.php
<div>remote content goes here</div>
which means remote content goes here inserted modal-body , replaced
one fine body...
however, wonder if can save whole #mymodel remote.html ie. take out #mymodal index.html , put remote.php. have tried doesn't work.
i have modal way...
<!--[if lt ie 9]> <script type="text/javascript"> $( "#placeholder" ).load( "/html/myexternalmodaldiv.html", function() { $('#myexternalmodaldiv').modal('toggle'); }); </script> <![endif]-->
this loads external modal markup , fire (just internet explorer < 9 in case) hope usefull example.
Comments
Post a Comment