我正在使用插件Fileuploader。我很难改变他的属性(类)。Id 必须与$('#jquery-wrapped-fine-uploader')
的 attr Id 相同(即<div id="jquery-wrapped-fine-uploader" class="main_pic">
)。有没有办法获得这个值?
$('#jquery-wrapped-fine-uploader').fineUploader({
request: {
endpoint: '../../main/fileupload',
params: {
'class' : (function(){
var class = 5;
/* Заместо 5 надо поставить атрибут class */
/* i.e. insert here an Class attr */
/* $(this).closest('#jquery-wrapped-fine-uploader').attr('class')
does not work :-(
*/
return id;
})(),
}
},
failedUploadTextDisplay: {
mode: 'custom',
maxChars: 256,
responseProperty: 'error',
enableTooltip: true
},
debug: true,
});
})