Skip to content

Instantly share code, notes, and snippets.

@edomaru
Created January 18, 2014 03:12
Show Gist options
  • Save edomaru/8485647 to your computer and use it in GitHub Desktop.
Save edomaru/8485647 to your computer and use it in GitHub Desktop.
Set Selected Option on HTML select element
// author http://stackoverflow.com/users/112407/rune-fs
$("div.id_100 option:selected").prop("selected",false);
$("div.id_100 option[value=" + value + "]").prop("selected",true);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment