浏览代码

don't try to apply the mask on non input elements

Robin Herbots 13 年之前
父节点
当前提交
a64a7e81f9
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      jquery.inputmask.js

+ 1 - 0
jquery.inputmask.js

@@ -470,6 +470,7 @@ This plugin is based on the masked input plugin written by Josh Bush (digitalbus
 
 
             function mask(el) {
             function mask(el) {
                 var $input = $(el);
                 var $input = $(el);
+                if (!$input.is(":input")) return;
 
 
                 //store tests & original buffer in the input element - used to get the unmasked value
                 //store tests & original buffer in the input element - used to get the unmasked value
                 $input.data('inputmask', {
                 $input.data('inputmask', {