Created
March 7, 2018 15:27
-
-
Save anonymous/5b4d764ad2edbe213344bdd7320754ef to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
login.html | |
<ul class="nav flex-row" id="menu"> | |
<li> | |
<a href="/" class="nav-link">Link</a> | |
</li> | |
<li> | |
<a href="/" class="nav-link">Link</a> | |
</li> | |
<li> | |
<a href="#theModal" class="nav-link" data-remote="/render/xJCCbGB5oA" data-toggle="modal" data-target="#theModal">Register</a> | |
</li> | |
</ul> | |
does code below part of login.html? | |
<div class="modal fade" id="theModal" tabindex="-1" role="dialog"> | |
<div class="modal-dialog" role="document"> | |
<div class="modal-content"> | |
<div class="modal-header"> | |
<h5 class="modal-title" id="exampleModalLabel">My modal</h5> | |
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> | |
<span aria-hidden="true">×</span> | |
</button> | |
</div> | |
<div class="modal-body"> | |
... remote content from "data-remote" loads here ... | |
</div> | |
<div class="modal-footer"> | |
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> | |
<button type="button" class="btn btn-primary">Send message</button> | |
</div> | |
</div> | |
</div> | |
</div> | |
I want to load a pop-up form that goes to another page register.html after clicking | |
<script type="text/javascript"> | |
var button = $(e.relatedTarget); | |
var modal = $(this); | |
// load content from HTML string | |
//modal.find('.modal-body').html("Nice modal body baby..."); | |
// or, load content from value of data-remote url | |
modal.find('.modal-body').load(button.data("remote")); | |
</script> | |
register.html | |
<form class="form-horizontal"> | |
<div class="form-group"> | |
<label for="inputEmail3" class="col-sm-2 control-label">Email</label> | |
<div class="col-sm-10"> | |
<input type="email" class="form-control" id="inputEmail3" placeholder="Email"> | |
</div> | |
</div> | |
<div class="form-group"> | |
<label for="inputPassword3" class="col-sm-2 control-label">Password</label> | |
<div class="col-sm-10"> | |
<input type="password" class="form-control" id="inputPassword3" placeholder="Password"> | |
</div> | |
<div class="col-sm-10 col-sm-offset-2"> </div> | |
<div class="form-group"> | |
<div class="col-sm-10 col-sm-offset-2"> | |
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button> | |
<button type="button" class="btn btn-success" data-dismiss="modal">Submit</button> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment