# Get event.target in focusin binding function

**URL:** <https://www.ruby-forum.com/t/get-event-target-in-focusin-binding-function/154930>\
**Category:** Rails\
**Created:** [December 5, 2008, 8:21am UTC](https://www.ruby-forum.com/t/get-event-target-in-focusin-binding-function/154930 "2008-12-05T08:21:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![artchrst](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e36b37/32.png) [@artchrst](https://www.ruby-forum.com/u/artchrst)\
**Post date:** [December 5, 2008, 8:21am UTC](https://www.ruby-forum.com/t/get-event-target-in-focusin-binding-function/154930/1 "2008-12-05T08:21:28Z")

</div>

I am fixing a problem in jQuery.Validator.js. I have to get the current  
input in the ‘onfocusin’.

It seems that the “event.target” is what I needed.

But how can I get the event object in the follwing binding function?

`
$.extend($.validator, {
  defaults: {
          ......
  onfocusin: function(element) {
              // how to get event.target here?
              ......
        }
        }
`

Thanks!  
Arthur
