http://docs.jquery.com/Events/jQuery.Event#event.target
On Wed, Jul 15, 2009 at 3:07 AM, Liam Byrne <[email protected]> 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 >

