Created
November 5, 2010 06:33
-
-
Save ramontayag/663736 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function () { | |
/* Attachment form */ | |
$("form#new_attachment").ajaxForm({dataType: 'script'}); | |
$("form#new_attachment :file").change(function() { | |
var uploadId = new Date().getTime(); | |
$('#attachment-list').append('<li id="upload_id_' + uploadId + '">' + this.value + ' <span>(uploading...)</span></li>'); | |
$('form#new_attachment input#upload_id').val("upload_id_" + uploadId); | |
$(this).closest('form#new_attachment').submit(); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment