Re: [jQuery] How to get keyCode

2007-02-06 Thread Yehuda Katz
I wrote an event fixer plugin that's in svn that provides a whole lot of help for keys (it makes thing like keyCode and keyChar work cross-browser, and in keypress as well as keyup). Check it out in the fix_events folder under plugins in jQuery's svn trunk. -- Yehuda On 2/6/07, Klaus Hartl <[EM

Re: [jQuery] How to get keyCode

2007-02-06 Thread weide
on 2007-2-6 21:42,Karl Swedberg said the following: I just inserted the code into a test page, and it worked for me. A couple things you can try: 1. Make sure you include jquery.js before your keydown script. 2. wrap your script in a $(document).ready(). So, the relevant snippet of the might

Re: [jQuery] How to get keyCode

2007-02-06 Thread Klaus Hartl
Karl Swedberg schrieb: > I just inserted the code into a test page, and it worked for me. A > couple things you can try: > > 1. Make sure you include jquery.js before your keydown script. > 2. wrap your script in a $(document).ready(). > > So, the relevant snippet of the might look like this (

Re: [jQuery] How to get keyCode

2007-02-06 Thread Karl Swedberg
I just inserted the code into a test page, and it worked for me. A couple things you can try: 1. Make sure you include jquery.js before your keydown script. 2. wrap your script in a $(document).ready(). So, the relevant snippet of the might look like this (until you put the keydown script i

[jQuery] How to get keyCode

2007-02-06 Thread weide
$("#tbPageInfo").keydown( function(e){ var key = e.charCode ? e.charCode : e.keyCode ? e.keyCode : 0; alert(key); } ); In FF2 it works but there is a error: jQuery is not defined http://localhost/qis/script/jquery.js Line 1 jQuery is not defined eval(function(p,a,c,k,e,d){e=function(c){return(cht