css - How to set a radio-button label to 'checked'? -


i've total of 3 radio buttons tiny rating. don't 'normal' radio buttons, i'm using font-awesome icons instead. how can mark them checked, when user clicks on 1 of these:

<input id="rate-bad" name="rate" type="radio" value="bad" tabindex="5"> <label class="choice" for="rate-bad"><i class="fa fa-frown-o fa-3x"></i>bad</label> 

the input button set invisible.

is there 'choice::checked' can used?

you can check jquery.

for example

<input id="rate-bad" name="rate" type="radio" value="bad" tabindex="5"> <label id="bad" class="choice" for="rate-bad"><i class="fa fa-frown-o fa-3x"></i>bad</label> 

jquery:

$("#bad").click(function() {    $("#rate-bad").prop('checked', true); }); 

Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -