Hey guys and gals.  I learned about the .call() functionality today
and decided to modify the behavior of the optional mask completed
function.  Now you don't need to specify an parameter when you define
your function; you can simply use "this".

Before:
$("#product").maskedinput("99/99/9999",{completed:function(input)
{alert("You typed the following: "+input.val());}});

Now:
$("#product").maskedinput("99/99/9999",{completed:function()
{alert("You typed the following: "+this.val());}});

It's not a necessary change, I just wasn't happy with forcing the user
to add a param to their functions.  It seemed a bit kludgey to me.

The new version is up at: http://digitalbush.com/projects/masked-input-plugin
and also at the official jQuery plugin repository:
http://jquery.com/plugins/project/maskedinput

Thank You
Josh

Reply via email to