jquery - FineUploader - add data-id to preview li -


I am trying to get the user jQuerySortable and FineUploader I'm following the callback on the Funloader:

< Pre> callback: {onComplete: function (id, name, response) {this.setDeleteFileParam ({attachment_id: response.attach_id, action: 'delete_attachment', nonce: Response.delete_nonce}, ID); $ (".qq-upload-list-selector"). Sorted ({genetic: function (item, container, _ super) {var data = $ (".qq-upload-list-selector"). ("Serialize") .get (); var jsonString = JSON.stringify ( Data, blank, ''); console.log (jsonString); _ super (item, container)}}); }}

uses jQuerySortable data-id for the serialize method, so I will need to add it to the preview li Complete Callback How can this be done?

First, find the handle on the file container element, then, find the appropriate child element at the end, desired Add attribute.

  callback: {onComplete: function (id, name, response) {var fileContainer = this.getItemByFileId (id), $ child = $ (fileContainer) ("{{Child element selector}}"); $ Child.attr ("Data-ID", response.attach_id); }}  

Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -