"checkbox test"
Bootstrap 3.0.0 Snippet by elkhunsu

<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"> <br> <div class="form-group"> <input type="checkbox" name="fancy-checkbox-danger-custom-icons" id="fancy-checkbox-danger-custom-icons" autocomplete="off" /> <div class="btn-group"> <label for="fancy-checkbox-danger-custom-icons" class="btn btn-success"> <span class="glyphicon glyphicon-remove"></span> <span class="glyphicon glyphicon-ok"></span> </label> <label for="fancy-checkbox-danger-custom-icons" class="btn btn-default active"> Default Checkbox </label> </div> </div> </div> </div>
.form-group input[type="checkbox"] { display: none; } .form-group input[type="checkbox"] + .btn-group > label span:first-child { display: none; } .form-group input[type="checkbox"] + .btn-group > label span:last-child { display: inline-block; } .form-group input[type="checkbox"]:checked + .btn-group > label span:first-child { display: inline-block; } .form-group input[type="checkbox"]:checked + .btn-group > label span:last-child { display: none; }

Related: See More


Questions / Comments: