I am in pursuit of implementing images as checkboxes. For now I am trying out a sample. The code below contains a simple image with a submit button next to it. On clicking t
$('#blr').on('click', function(e) { var $this = $(this), $imgCheck = $(this).next().attr('checked'), border_styles = ['solid 2px red', 'none'] is_checked = $imgCheck.attr('checked'); $this.css('border', border_styles[is_checked]); $imgCheck.attr('checked', !is_checked); })