Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

207
Views
jQuery Ajax File Uploader Widget multi image preview is inverted, last image is first, and first image is last

I use the following jQuery Ajax File Uploader Widget: https://github.com/danielm/uploader As you can see in the demo, the order of previewing the images is reversed.

Demo URL: https://danielmg.org/demo/java-script/uploader/basic

I want to fix this and i don't know how. I don't have very good knowledge of javascript. If anyone is good at Javascript and wants to help me with this issue, I would be grateful.

Thank you! Regards

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I found the solution, in the javascript file ui.js was the following function:

// Creates a new file and add it to our list
function ui_multi_add_file(id, file, file_type) {
var template = $('#files-template-' + file_type).text();
template = template.replace('%%filename%%', file.name);

template = $(template);
template.prop('id', 'uploaderFile' + id);
template.data('file-id', id);

$('#files-' + file_type).find('li.empty').fadeOut(); // remove the 'no files yet'
$('#files-' + file_type).prepend(template);
}

I changed prepend(template) with append(template), and now the uploading filles will show in the correct format.

Thanks anyway, I hope it is useful to other users.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!