inputmask.binding.js 1.1 KB

123456789101112131415161718192021
  1. /*!
  2. * bindings/inputmask.binding.js
  3. * https://github.com/RobinHerbots/jquery.inputmask
  4. * Copyright (c) 2010 - 2017 Robin Herbots
  5. * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
  6. * Version: 3.3.5-222
  7. */
  8. !function(factory) {
  9. "function" == typeof define && define.amd ? define([ "jquery", "../inputmask", "../global/document" ], factory) : "object" == typeof exports ? module.exports = factory(require("jquery"), require("../inputmask"), require("../global/document")) : factory(jQuery, window.Inputmask, document);
  10. }(function($, Inputmask, document) {
  11. $(document).ajaxComplete(function(event, xmlHttpRequest, ajaxOptions) {
  12. -1 !== $.inArray("html", ajaxOptions.dataTypes) && $(".inputmask, [data-inputmask], [data-inputmask-mask], [data-inputmask-alias]").each(function(ndx, lmnt) {
  13. void 0 === lmnt.inputmask && Inputmask().mask(lmnt);
  14. });
  15. }).ready(function() {
  16. $(".inputmask, [data-inputmask], [data-inputmask-mask], [data-inputmask-alias]").each(function(ndx, lmnt) {
  17. void 0 === lmnt.inputmask && Inputmask().mask(lmnt);
  18. });
  19. });
  20. });