Created
January 19, 2016 14:50
-
-
Save battaile/59ec54e0095c0568fe8b to your computer and use it in GitHub Desktop.
yePjZW
This file contains hidden or 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
<html> | |
<head> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> | |
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script> | |
</head> | |
<body> | |
<div class="container"> | |
<h2>Customer Info</h2> | |
<p><b>Name:</b> Jason Rindge</p> | |
<p><b>Order ID:</b> 1234-56-ab</p> | |
<button type="button" class="btn btn-success" data-toggle="collapse" data-target="#demo"> | |
<span class="glyphicon glyphicon-collapse-down"></span> Address | |
</button> | |
<div id="demo" class="collapse"> | |
<div class="form-group"> | |
<label for="inputPassword3" class="col-sm-2 control-label">Address 1</label> | |
<div class="col-sm-10"> | |
<input type="text" class="form-control" id="inputAddress1" placeholder="Address1"> | |
</div> | |
</div> | |
| |
<div class="form-group"> | |
<label for="inputPassword3" class="col-sm-2 control-label">Address 2</label> | |
<div class="col-sm-10"> | |
<input type="text" class="form-control" id="inputAddress2" placeholder="Address2"> | |
</div> | |
</div> | |
<span> etc </span> | |
</div> | |
</div> | |
<script> | |
$(document).ready(function(){ | |
$("#demo").on("hide.bs.collapse", function(){ | |
$(".btn").html('<span class="glyphicon glyphicon-collapse-down"></span> Open'); | |
}); | |
$("#demo").on("show.bs.collapse", function(){ | |
$(".btn").html('<span class="glyphicon glyphicon-collapse-up"></span> Close'); | |
}); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment