Skip to content

Instantly share code, notes, and snippets.

View thedamon's full-sized avatar

Damon Muma thedamon

View GitHub Profile
@thedamon
thedamon / 'other' selection
Created June 8, 2012 19:21
Toggles an input after any <select> item with a value of 'other' is chosen
if($("select").length) {
$("select").live("change", function(){
$(this).next(".other").remove();
if($(this).val() == "Other") {
$(this).after('<input name="'+$(this).attr('name')+'[other]" class="other">');
}
});
}