Solved

jquery event handler how do I access element on blur?

Posted on 2012-04-13
2
354 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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction Chart.js, used properly, can visually add a difference to your charting applications. It engages your visitors and allows them to interact with data they otherwise wouldn't be able to without expensive and complicated systems. For this…
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 how to dynamically set the form action using jQuery.
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…

708 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now