I am trying to append array of option objects to two select tag. But it appends to second select tag only.
<script src="http://code.jquery.com/jquery-1.11.2.min.js"></script>
<select id="select1"></select>
<select id="select2"></select>
<script>
var options = [];
var option1 = new Option("1", "1");
options.push(option1);
var option2 = new Option("2", "2");
options.push(option2);
var option3 = new Option("3", "3");
options.push(option3);
$("#select1").append($(options));
$("#select2").append($(options));
</script>
If I use only one select to append options it works. But for more than two it wont. It appends to last one only. Please help to resolve this...