0
我想要用戶jQuerySortable和FineUploader。我已經在FineUploader以下的回調:FineUploader - 添加數據ID預覽li
callbacks: {
onComplete: function(id, name, response) {
this.setDeleteFileParams({
attachment_id: response.attach_id,
action: 'delete_attachment',
nonce: response.delete_nonce
}, id);
$(".qq-upload-list-selector").sortable({
onDrop: function (item, container, _super) {
var data = $(".qq-upload-list-selector").sortable("serialize").get();
var jsonString = JSON.stringify(data, null, ' ');
console.log(jsonString);
_super(item, container)
}
});
}
}
的jQuerySortable使用data-id
的序列化方法,所以我需要它在onComplete
回調添加到預覽li
。如何才能做到這一點?
什麼是「data-id」? –
對不起,我需要添加''li'像'
',其中id是'response.attach_id'。 – user1049961