Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
jQuery Add Other input box to select dropdown
// Use jquery .change() to bind change event of an element
// Give your form ID of #form
// Add your select with option of 'Other' and add input with class of .inputvis with initial CSS display of none
jQuery( document ).ready(function($) {
var Select = '#form select';
if($('Select option:selected').text() == "Other"){
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment