Large area for radio selection
This is the best way.
$('span').click(function() {
$(this).find('input').attr({checked:"checked"});
});
Just keep in mind that you are adding a click event for all ranges. It would be better to have a class on the span and a link to it.
$('.myClickySpan')...
<span class='myClickySpan'>...
Well, the easiest solution would be to wrap everything inside the tag <label>, for example:
<label for="foo">
<img src="img/icon.png" alt="" />
<input type="radio" name="" id="foo" />
</label>
When you specify the attribute forfor the label and the same idin the field, the label becomes interactive and activates the corresponding input.
- jQuery, :
$('span').click(function() {
$(this).find('input').click();
return false;
});