I have the following filter setup:
<div class="element">
<input type="radio" name="group1" value="1">
<input type="radio" name="group1" value="2">
<input type="radio" name="group1" value="3">
</div>
<div class="element">
<input type="radio" name="group2" value="1">
<input type="radio" name="group2" value="2">
<input type="radio" name="group2" value="3">
</div>
And I'm using the following to select the first radio buttons automatically:
$('.element').each(function(){
$('input[type=radio]', this).get(0).checked = true;
});
The problem is, even though the first radio buttons are selected, the filter I'm using isn't reflecting those selections because it's using an onChange event. So, when the first radio buttons are checked (on load), how can I have them trigger a change event so the filter will function?
Any ideas?