javascript - Add class to radio button -
<input id="radio1" type="radio" name="rgroup" value="1" > <label for="radio1"><span><span></span></span>1</label> <input id="radio2" type="radio" name="rgroup" value="2" > <label for="radio2"><span><span></span></span>1</label> i have , want add image element checked using javascript. how can it?
is important add class radio checked? can css:
#radio1:checked + label { color: #f00; } #radio1:checked + label:after { content: url(image_url_here); } demo 2 (with image embedded when select radio box)
demo 3 (with tick image)
Comments
Post a Comment