"Colorful Input Groups"
Bootstrap 3.3.0 Snippet by brylie

<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.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>Create Colorful Input Groups!</h2> </div> <div class="row form-group"> <div class="input-group"> <span class="input-group-addon primary">Front</span> <input class="form-control" value="big-subdomain.example.com" title="big-subdomain.example.com" readonly name="frontend-text" id="frontend-text"> <span class="input-group-addon success">HTTPS</span> </div> </div> </div>
.input-group-addon.primary { color: rgb(255, 255, 255); background-color: rgb(50, 118, 177); border-color: rgb(40, 94, 142); } .input-group-addon.success { color: rgb(255, 255, 255); background-color: rgb(92, 184, 92); border-color: rgb(76, 174, 76); } .input-group-addon.info { color: rgb(255, 255, 255); background-color: rgb(57, 179, 215); border-color: rgb(38, 154, 188); } .input-group-addon.warning { color: rgb(255, 255, 255); background-color: rgb(240, 173, 78); border-color: rgb(238, 162, 54); } .input-group-addon.danger { color: rgb(255, 255, 255); background-color: rgb(217, 83, 79); border-color: rgb(212, 63, 58); } input[readonly] { cursor: text !important; }
$(function () { $("#frontend-text").on("click", function () { $(this).siblings().hide(2000); $(this).width("100%"); $(this).siblings().show(2000); }); });

Related: See More


Questions / Comments: