- ใช้ตัว upload ที่มี process เอามาจาก https://tutorialzine.com/2013/05/mini-a ... pload-form
อยากให้ตัวเลขขึ้นแบบนี้นะคะ code ในไฟล์ script.js
โค้ด: เลือกทั้งหมด
<!--ส่วนที่แสดง process วงกลม-->
var tpl = $('<li class="working"><input type="text" value="0" data-width="50" data-height="80"' +
' data-fgColor="#0788a5" data-readOnly="1" data-min="-100" data-displayPrevious=true class="dial" /><div class="row"><div class="col-xs-12 col-md-4"><p></p></div></div></li>');
<!--ส่วนคำนวณตอนวิ่ง upload ไฟล์-->
progress: function (e, data) {
// Calculate the completion percentsage of the upload
var progress = parseInt(data.loaded / data.total * 100, 10);
data.context.find('input').val(progress).change();
if (progress == 100) {
data.context.removeClass('working');
}
},