Skip to content

Instantly share code, notes, and snippets.

@brenopolanski
Created September 15, 2015 13:00
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brenopolanski/a1e6103a927d41a65e06 to your computer and use it in GitHub Desktop.
Save brenopolanski/a1e6103a927d41a65e06 to your computer and use it in GitHub Desktop.
Check if value is in select list with JQuery
var x = 'foo';
var exists = 0 != $('#select-box option[value=" + x + "]').length;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment