Q:

Check input radio on image click

Here's my HTML:
<img src="img.jpg" class="img-ms-form">
<div class="radio">
    <label class="radio"><input type="radio" name="optradio-1" required>Option 1</label>
</div>

I'm trying to check the radio button if the image is clicked. Here's what I've tried:
$('.img-ms-form').click(function(){
    $(this).next('input[type=radio]').prop('checked', true);
});

But this doesn't seem to work, what am I doing wrong?

A:

Use .next() and .find() as shown :-
$('.img-ms-form').click(function(){
  $(this).next('div.radio').find('input[type="radio"]').prop('checked', true);
});

A:

$('.img-ms-form').click(function() {
  $(this).next().find('input[type=radio]').prop('checked', true);
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<img src="img.jpg" class="img-ms-form">
<div class="radio">
  <label class="radio">
    <input type="radio" name="optradio-1" required>Option 1</label>
</div>
I'm trying to check the radio button if the image is clicked. Here's what I've tried:

Radio is not sibling so you cant just use .next('input[type=radio]')
Use .next() with .find()

