Cheers John!
Had forgotten about / omitted the ".srcElement" :-P
L
John Beppu wrote:
http://docs.jquery.com/Events/jQuery.Event#event.target
On Wed, Jul 15, 2009 at 3:07 AM, Liam Byrne <l...@onsight.ie
<mailto:l...@onsight.ie>> wrote:
Hi folks
I have a function that operates on left and right arrow keypress,
but I want to temporarily "return true" if they're pressed while
an input has focus.
One way I thought of was to check the tagname of the event ?
The other way is to check the length of the input:focus array, but
I reckon that'd be slower ?
So having a function
$(document).keydown(function(e) {
// function code here
}
Is it possible to :
a) filter the document so that input fields are avoided
b) return true based on a check on e's tag name (help required)
c) other
Help greatly appreciated!
TIA,
L
------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.387 / Virus Database: 270.13.14/2238 - Release Date: 07/14/09 18:03:00