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

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

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

android - How to create dynamically Fragment pager adapter -