Переписать скрипт обработки формы с jQuery на чистый js
Пример кода:
(function($){
var AjaxForm = function(element, options)
{
var elem = jQuery(element);
var form = (typeof elem.attr('id') !== 'undefined') ? '#'+jQuery(elem).attr('id') : jQuery(elem);
var response = (typeof elem.attr('data-response') !== 'undefined') ? $.extend({}, $(elem).attr('data-response').split(',')) : jQuery.extend({},[elem]);
var url = jQuery(elem).attr('action');
var type = (typeof elem.attr('method') !== 'undefined') ? jQuery(elem).attr('method') : 'POST';
var auto_submit = (typeof elem.attr('data-auto-submit') !== 'undefined') ? jQuery(elem).attr('data-auto-submit') : false;
var data = {};
var timer;
var send_now = false;
if (typeof options !== 'undefined') options.response = jQuery.extend({}, options.response.split(','));
var settings = $.extend({
'elem': elem,
'form': form,
'response': response,
'url' : url,
'type' : type,
'dataType' : 'json',
'time_submit' : 1200,
'auto_submit' : auto_submit,
'data' : data,
'send_now' : send_now
}, options || {});Сложных вычислений и функций - нету.
Длинна скрипта до 700 строчек (с переносами, правильно отформатированных).
-
266 13 0 Доброе утро.
Я на больничном, поэтому энтузиазм зашкаливает.
P.S. Мысленно вместе.
Current freelance projects in the category Desktop Apps
Modification in the emulator's operation
45 USD
Hello. I downloaded the Gaminator CF Final slot machine emulator from the Internet. I really liked it, but there are some issues. There is an admin panel, but it opens freely and cannot be closed at all. It only closes along with the application. Also, the data does not save… Desktop Apps ∙ 7 days 7 hours back ∙ 10 proposals |
Development of custom software (Android application + CMS) for SUNMI K2 self-service kiosks (Fast food)
22 USD
We are looking for an experienced team or a Middle/Senior Android developer (possibly with Full-stack skills) to create proprietary software for self-service kiosks for a fast food retail chain. Currently, our terminals operate on a ready-made cloud integrator, but we are… Content Management Systems, Desktop Apps ∙ 12 days 3 hours back ∙ 23 proposals |