Skip to content

Instantly share code, notes, and snippets.

@devoutdesign
Created September 15, 2010 17:19
Show Gist options
  • Save devoutdesign/581082 to your computer and use it in GitHub Desktop.
Save devoutdesign/581082 to your computer and use it in GitHub Desktop.
An example of using valums file uploader and how to modify the list item onComplete
var uploader = new qq.FileUploader({
onComplete: function(id, filename, responseJSON) {
if (responseJSON.success) {
var item = uploader._getItemByFileId(id);
var myElement = uploader._getElement(item, 'myCustomClass');
myElement.style.display = 'inline-block';
}
},
fileTemplate:
'<li>' +
// ...
'<span class="qq-upload-foobar"></span>' +
'</li>',
classes: {
// ...
myCustomClass: 'qq-upload-foobar'
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment