Sean Catchpole wrote:
.mask is nice because it's short, but .maskInput is nice because it's more unique. I can think of other ways to "mask" and element. Perhaps using both would be good:
$.fn.mask = $.fn.maskInput = function(mask,options){...};
This would allow the quick and dirty, but in case another plugins also wanted to use the name .mask, we could still use .maskInput
No, there should be only one way to access that. Both are fine. "mask" is nicer as a plugin method, as its most likely used with $("input.someClass").mask(), therefore the "input" in "maskInput" would be obvious anyway.

--
Jörn Zaefferer

http://bassistance.de

Reply via email to