jQuery: How to set one <select> element to the value of another (using onchange equivalent)

Say you have an HTML <select> form element and you want to set another <select> element equal to the first one when it changes. Here’s an easy way to do so with jQuery:

$('#id_of_select1').change(function() {
    var select1_value = $(this).val();
    $('#id_of_select2').val(select1_value);
});

—————-
Now playing: Drexciya – Astronomical Guidepost
via FoxyTunes