akzhan / jquery-keyfilter

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

Compatibility with jQuery 1.9.0 #10

Closed radekdostal closed 11 years ago

radekdostal commented 11 years ago

Hi, jQuery 1.9.0 no longer supports $.browser. Can you please fix it?

Thx

glat commented 11 years ago

+1

akzhan commented 11 years ago

Will be fixed in 24h.

nathanl commented 11 years ago

+1

richardgrantham26 commented 11 years ago

This is such a cool plugin, does exactly what I was looking for. Will this be updated to work on 1.9.1? Thanks in advance :)

richardgrantham26 commented 11 years ago

I added the following:

// Updating for 1.9.0 var browser = { chrome: false, mozilla: false, opera: false, msie: false, safari: false }; var sBrowser, sUsrAg = navigator.userAgent; if(sUsrAg.indexOf("Chrome") > -1) { browser.chrome = true; } else if (sUsrAg.indexOf("Safari") > -1) { browser.safari = true; } else if (sUsrAg.indexOf("Opera") > -1) { browser.opera = true; } else if (sUsrAg.indexOf("Firefox") > -1) { browser.mozilla = true; } else if (sUsrAg.indexOf("MSIE") > -1) { browser.msie = true; }

And used browser. instead of $.browser and it seems to work, just in case you wanted to use any of this

richardgrantham26 commented 11 years ago

delete doesn't seem to work in FF