Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save AlphaBlossom/2f39c59d9dfd4e011b9e8af6f9eb1b75 to your computer and use it in GitHub Desktop.
Save AlphaBlossom/2f39c59d9dfd4e011b9e8af6f9eb1b75 to your computer and use it in GitHub Desktop.
<script>
// Add "- Select -" as first option on all <select> fields, but disabled to visitor has so choose one of the other options
$(document).ready(function(){
$('select').prepend('<option value="" disabled="disabled" selected="selected">- Select -</option>');
})
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment