I tried, seems like it works just fine =): input.one("unmask",function(){ input.unbind("focus",focusEvent); input.unbind("blur",checkVal); input.unbind("keydown",keydownEvent); input.unbind("keypress",keypressEvent); input.unbind('paste, input',checkValST0); }); input.bind("focus",focusEvent); input.bind("blur",checkVal); input.bind("keydown",keydownEvent); input.bind("keypress",keypressEvent); input.bind('paste, input', checkValST0); checkVal();//Perform initial check for existing values }); function checkValST0(){ setTimeout(checkVal,0); };
And maybe it's better to accept RegExp to use it like a template for validation? 2007/11/30, Josh Bush <[EMAIL PROTECTED]>: > > By using the "event.identifier" type binding, I'd be limiting my > plugin to 1.2.x+. I've never tried using bind with the paste and > input events. The solution that is in the plugin was the only way I > could make it work, but that was quite some time ago. I'll > investigate that further when I get home tonight. Can anyone confirm > if that would work or not? > > Josh > > On Nov 30, 6:56 am, "KidsKilla .grin! wuz here" <[EMAIL PROTECTED]> > wrote: > > Great plugin! > > i only think it's better to use somethin like > > $(this).bind('paste.jqmask, input.jqmask',function(){ > > setTimeout(checkVal,0);};) > > > > instead of > > if ($.browser.msie) > > this.onpaste= function(){setTimeout(checkVal,0);}; > > else if ($.browser.mozilla) > > this.addEventListener('input',checkVal,false); > > > > 2007/11/30, Josh Bush <[EMAIL PROTECTED]>: > > > > > > > > > > > > > I just released version 1.1.2 of my Masked Input Plugin for jQuery. > > > Felix Geisendörfer helped me mash out a few things with this release. > > > He fixed the bug for Mac/Firefox with the backspace key and got me to > > > open up the caret positioning functions. Thanks Felix! > > > > > Here are the changes for this release > > > > > * Fixed a bug in Mac Firefox with backspacing. > > > * Fixed a bug where delete at end of mask produced an extra > > > placeholder character. > > > * Exposed the caret positioning and retrieval methods as a jQuery > > > function extension. You can now call $().caret() to get a caret > > > position and $().caret(start [,end]) to set a caret position. > > > > > Please go check out the latest version > > > athttp://digitalbush.com/projects/masked-input-plugin > > > > -- > > Максим Игоревич Гришаев, > > AstroStar.ru > -- Максим Игоревич Гришаев, AstroStar.ru