Код: Выделить всё
import jQuery from "jquery";
window.$ = window.jQuery = jQuery;
import jqueryForm from 'jquery-form';
$.fn.ajaxForm = jqueryForm;
$('#update_form').ajaxForm({
delegation: true,
uploadProgress: function (event, position, total, percentComplete) {
//Update progress
},
success: function (result) {
//handle request success
},
error: function (xhr, ajaxOptions, thrownError) {
//handle request error
},
});
Подробнее здесь: https://stackoverflow.com/questions/791 ... -with-vite
Мобильная версия