Solved

jquery event handler how do I access element on blur?

Posted on 2012-04-13
2
365 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Javascript: Range object 16 35
Bootstrap NavBar Not Working 2 31
How does GeoJson relates to Leaflet and Mapbox? 4 50
How does this modal work? 3 34
Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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…

710 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