I have two select
elements and would like to tigger a change event on both at the same time. With only one select element, I would do the following:
HTML
<select class="check">
<option value="one">one</option>
<option value="two">two</option>
</select>
JQuery
$('.check').change(function(){
var data= $(this).val();
alert(data);
});
$('.check').val('two').trigger('change');
Does anyone know how to set the first element (regardless of value) in both select
elements?
<select class="check">
<option value="one">one</option>
<option value="two">two</option>
</select>
<select class="check">
<option value="three">three</option>
<option value="four">four</option>
</select>
Many thanks in advance!