Jquery Check Radio - Pls Help

Moobs

Regular Member
Joined
Jan 30, 2015
Messages
276
Reaction score
24
I'm trying to make it so when a certain element is clicked this jquery script selects a specific radio. (should function the same as clicking the actual button)

#id is the id of the input just to be clear. I changed it to #id for this example.


Code:
<input type="radio" class="input-radio " value="cow" name="moo" id="id" />



$( ".selectionWrapper" ).click(function() {   
           $("#id").prop('checked', true);
                 
});
 
Solved

Code:
$("input[name=name][value='value']").prop("checked",true);
 
Glad to hear you fixed it!

Do you mind showing me the HTML (including the .selectionWrapper) in case there's a better way? For example, is it not possible to use a <label> in your particular case?
 
Back
Top