akzhan / jquery-keyfilter

This plugin filters keyboard input by specified regular expression.
http://akzhan.github.com/jquery-keyfilter/
37 stars 11 forks source link

include in keypress subcribtion function with source element parameter. #3

Open slavapvf opened 12 years ago

slavapvf commented 12 years ago

Hi, I have a lot of elements with chstom attributes, i subscribe keypress in one function, but i don't know which control fires this event, it would be nice ti send also source control:

        if ($.isFunction(re))
        {
            ok = re.call(this, cc, add control or even e there);
        }
        else
        {
            ok = re.test(cc);
        }