I'm using this for custom radio buttons and checkboxes, but I need to change the :before
element's background on click. Is it possible?
HTML
<div class="checkbox">
<input type="checkbox" value="1" name="test">
</div>
CSS (its .less)
.checkbox {
display: inline-block;
margin: 0 4px 0 0;
cursor: pointer;
text-align: left;
padding: 0px;
input { display: none; }
&:before {
background: url(/img/checkboxes.png) no-repeat;
content: "";
float: left;
height: 18px;
width: 19px;
margin: 0;
}
}