inputmask.binding.js 853 B

1234567891011121314151617181920212223242526
  1. /*
  2. Input Mask plugin binding
  3. http://github.com/RobinHerbots/jquery.inputmask
  4. Copyright (c) Robin Herbots
  5. Licensed under the MIT license
  6. */
  7. (function (factory) {
  8. factory(jQuery, window.Inputmask, window);
  9. }
  10. (function ($, Inputmask, window) {
  11. $(window.document).ajaxComplete(function (event, xmlHttpRequest, ajaxOptions) {
  12. if ($.inArray("html", ajaxOptions.dataTypes) !== -1) {
  13. $(".inputmask, [data-inputmask], [data-inputmask-mask], [data-inputmask-alias], [data-inputmask-regex]").each(function (ndx, lmnt) {
  14. if (lmnt.inputmask === undefined) {
  15. Inputmask().mask(lmnt);
  16. }
  17. });
  18. }
  19. }).ready(function () {
  20. $(".inputmask, [data-inputmask], [data-inputmask-mask], [data-inputmask-alias],[data-inputmask-regex]").each(function (ndx, lmnt) {
  21. if (lmnt.inputmask === undefined) {
  22. Inputmask().mask(lmnt);
  23. }
  24. });
  25. });
  26. }));