Skip to content

Instantly share code, notes, and snippets.

@Veejay
Created March 12, 2012 16:23
Show Gist options
  • Save Veejay/2023140 to your computer and use it in GitHub Desktop.
Save Veejay/2023140 to your computer and use it in GitHub Desktop.
$ ->
$('div.client_selector select#project_client_id')
.change ->
if $(@).val() == "new"
$(@).closest('div.client_selector').append '<input id="client_name" name="client[name]" size="30" type="text">'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment