
| Current Path : /var/www/html/store/web/modules/contrib/commerce_funds/js/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/store/web/modules/contrib/commerce_funds/js/delayed_submit.js |
(function ($, Drupal) {
Drupal.behaviors.delayed_submit = {
attach: function (context, settings) {
$('.delayed-input-submit').each(function () {
var self = $(this);
var timeout = null;
var delay = self.data('delay') || 1000;
var triggerEvent = self.data('event') || "end_typing";
self.unbind('keyup').keyup(function () {
clearTimeout(timeout);
timeout = setTimeout(function () {
if (self.val()) {
self.trigger(triggerEvent);
}
}, delay);
});
});
}
}
})(jQuery, Drupal);