Get source of blur when invoked with jQuery <p>I have a form (for user registration) that's paginated via splitting it up into divs that are hidden/displayed with .slideUp()/.slideDown(). It all works pretty well, but I want to validate each page with javascript before they proceed to the next page to reduce the number of errors that come back from the server-side validation. Right now I have them set to validate onblur. To check all the elements when the "next" button is clicked, I want to use .blur() to force it to validate each input, but I'm getting an error. An example of my onblur function is:</p> <pre><code>var validateEmpty = function() { var $src = $('.registrationPage #' + event.srcElement.id); validate($src, "Can't be left empty!", checkEmptyRequired); } </code></pre> <p>It's being bound by setting the <code>onblur</code> attribute to the function.</p> <p>Where validate is a function that takes a jQuery object, an error message, and a function that returns a boolean. The error I get is </p> <pre><code>TypeError: Cannot read property 'srcElement' of undefined </code></pre> <p>So it seems clear to me that .blur() doesn't trigger a javascript event and simply calls the onblur function. How can I get the id of a blurred element in a way that will work both when blurred normally (by losing focus in the page) and with .blur()?</p>