This repository has been archived on 2025-01-19. You can view files and clone it, but cannot push or open issues or pull requests.
drupalcampbristol/web/modules/contrib/webform/js/webform.element.inputmask.js

26 lines
445 B
JavaScript
Raw Normal View History

2017-03-16 15:29:07 +00:00
/**
* @file
2018-11-23 12:29:20 +00:00
* JavaScript behaviors for jquery.inputmask integration.
2017-03-16 15:29:07 +00:00
*/
(function ($, Drupal) {
'use strict';
/**
* Initialize input masks.
*
* @type {Drupal~behavior}
*/
2018-11-23 12:29:20 +00:00
Drupal.behaviors.webformInputMask = {
2017-03-16 15:29:07 +00:00
attach: function (context) {
2018-11-23 12:29:20 +00:00
if (!$.fn.inputmask) {
return;
}
$(context).find('input.js-webform-input-mask').once('webform-input-mask').inputmask();
2017-03-16 15:29:07 +00:00
}
};
})(jQuery, Drupal);