Hi,
I want to add jquery library and jquery.form.min in Moodle 3.7 also call ajax.form function. but it shows ajax_form an undefined error in the console.
i am using the following code in the filepicker.js file for the progress bar when file uploading.
here is the code:
$('.fp-upload-form').ajaxForm({
beforeSubmit: function () {
$("#progressDivId").css("display", "block");
var percentValue = '0%';
$('#progressBar').width(percentValue);
$('#percent').html(percentValue);
},
uploadProgress: function (event, position, total, percentComplete){
// progress(600, 600, $('#timer_bar'));
alert("some");
var percentValue = percentComplete + '%';
$("#progressBar").animate({
width: '' + percentValue + ''
}, {
duration: 5000,
easing: "linear",
step: function (x) {
percentText = Math.round(x * 100 / percentComplete);
alert(percentText);
$("#percent").text(percentText + "%");
}
});
},
});
Can anyone help me?
Thank you!