Forum: Ruby on Rails get event.target in focusin binding function

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
F3f27949240208ffe170ff8ba6abe6ea?d=identicon&s=25 Arthur Chan (arthurccube)
on 2008-12-05 08:21
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?


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

</code>


Thanks!
Arthur
This topic is locked and can not be replied to.