Skip to content

Instantly share code, notes, and snippets.

@stevebooks
Created June 19, 2013 19:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stevebooks/5817298 to your computer and use it in GitHub Desktop.
Save stevebooks/5817298 to your computer and use it in GitHub Desktop.
form = $('#option_expense_report')
when drop element
certificateId = element.data('certificate-id')
html += '<input type="hidden" id= value="' + certificateId + '" name="option_expense_report[certificates][]">'
form.append($(html))
$('a.certificate_link').click ->
certId = $(this).date('certificate-id')
$('input#' + certId).remove()
$(this).parent.remove()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment