Solved

jquery event handler how do I access element on blur?

Posted on 2012-04-13
2
359 Views
Last Modified: 2012-04-13
I am going to be using blur and want to know how to access the dom element I am passing in.  How do I implement the eventData and use it?

In the documentation, it says this:
.blur( [eventData], handler(eventObject) )
0
Comment
Question by:jackjohnson44
2 Comments
 
LVL 14

Expert Comment

by:nishant joshi
ID: 37844433
0
 
LVL 23

Accepted Solution

by:
basicinstinct earned 500 total points
ID: 37844439
http://jsfiddle.net/Lk3b6/

$('#target').blur({foo:"bar"}, function(e) {
    alert("Element that lost focus: " + e.target.id);
    alert("data: " + e.data.foo);
});¿
0

Featured Post

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What is a Lightbox? A Lightbox is the effect you see when you click, for example, an image and the screen fades out and up pops the same image but in its full size dimensions. There are lots of Lightbox effects for jQuery. Problem is they are a…
In this article you'll learn how to use Ajax calls within your CodeIgniter application. To explain this, I'll illustrate how to implement a simple contact form to allow visitors to send you an email through your web site.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question