Skip to content

Instantly share code, notes, and snippets.

@cv711
Created June 12, 2013 15:04
Show Gist options
  • Save cv711/5766110 to your computer and use it in GitHub Desktop.
Save cv711/5766110 to your computer and use it in GitHub Desktop.
Sync choices in two (identical) select tags
$('select').on('change', function(e){
var index =$(':selected').first().index();
var second = $('select')[1];
var option = second.options[index];
option.selected = true;
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment