Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm using the jquery iMask plugin found here. Here is my code: fiddle

When I run it
1) it doesn't work correctly. The input for phone is not masked like i set it up
2) the console displays the error:

Uncaught ReferenceError: Json is not defined fiddle.jshell.net:1

What is this error and how do I fix it? Thanks

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
207 views
Welcome To Ask or Share your Answers For Others

1 Answer

It's not a jQuery plugin, it's a mootools plugin.

Use the jQuery port instead https://github.com/cwolves/jQuery-iMask

http://jsfiddle.net/GtQKh/9/

$(document).ready(function(e) {
   $('#phone').iMask({  
     type:'fixed',  
     mask:'(999) 999-9999',  
     stripMask: false
   });
});?

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...