"Image Checkbox"
Bootstrap 3.3.0 Snippet by girardinsamuel

<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"> <form method="get"> <div class="form-group"> <div class="col-md-3 card"> <label class="btn "> <img src="http://content.nike.com/content/dam/one-nike/globalAssets/menu_header_images/OneNike_Global_Nav_Icons_Running.png" alt="..." class="img-responsive img-check"> <p>Titre 1</p> <input type="checkbox" name="chk1" id="item4" value="val1" class="hidden" autocomplete="off"> </label> </div> <div class="col-md-3 card"><label class="btn "><img src="http://content.nike.com/content/dam/one-nike/globalAssets/menu_header_images/OneNike_Global_Nav_Icons_Basketball.png" alt="..." class="img-responsive img-check"><input type="checkbox" name="chk2" id="item4" value="val2" class="hidden" autocomplete="off"></label></div> <div class="col-md-3 card"><label class="btn "><img src="http://content.nike.com/content/dam/one-nike/globalAssets/menu_header_images/OneNike_Global_Nav_Icons_Football.png" alt="..." class="img-responsive img-check"><input type="checkbox" name="chk3" id="item4" value="val3" class="hidden" autocomplete="off"></label></div> <div class="col-md-3 card"><label class="btn "><img src="http://content.nike.com/content/dam/one-nike/globalAssets/menu_header_images/OneNike_Global_Nav_Icons_Soccer.png" alt="..." class="img-responsive img-check"><input type="checkbox" name="chk4" id="item4" value="val4" class="hidden" autocomplete="off"></label></div> </div> <input type="submit" value="Check Item" class="btn btn-success"> </form> </div> </div> </body> </html>
.check { opacity:1; border-color: blue; box-shadow: 0px 2px 6px 0px #7b7b7b; } .card { opacity: 0.5; background-color: white; border-color: grey; border-style: solid; border-width: 1px; border-radius: 4px; outline: none; box-shadow: 0px 1px 1px 0px #7b7b7b; width: 30%; text-align:center; color: black; margin: 5px; } .card-check { opacity: 1; border-color: blue; border-radius: 4px; box-shadow: 0px 2px 6px 0px #7b7b7b; }
$(document).ready(function(e){ $(".img-check").click(function(){ $(this).parent().parent().toggleClass("card-check"); }); });

Related: See More


Questions / Comments: