JavaScript
  Home arrow JavaScript arrow Focusing and Blurring Elements with the jQ...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
JAVASCRIPT

Focusing and Blurring Elements with the jQuery JavaScript Library
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 2
    2009-09-09

    Table of Contents:
  • Focusing and Blurring Elements with the jQuery JavaScript Library
  • Introducing the focus() method
  • Using the blur() method
  • Introducing the submit() method

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Focusing and Blurring Elements with the jQuery JavaScript Library


    (Page 1 of 4 )

    If you’re a web designer who’s looking for a JavaScript library that lets you develop powerful client-side applications by using a friendly programming interface, then I have great news for you. This series of articles gets you started using the most relevant features that comes packaged with the jQuery JavaScript framework. You'll be able to get the most out of this useful piece of software in a very short time. This is the fifth article in an eight-part series.

    Introduction

    Having already introduced you to the primary subject of this article series, it’s time to quickly review the topics covered in the preceding tutorial. This way, you’ll be able to link them more easily with the ones that I plan to discuss in this part.

    Well, as you’ll possibly recall, in that particular article I developed a couple of rudimentary JavaScript applications, which were aimed at demonstrating how to handle “keydown” and “keyup” events by means of the jQuery API. I showed you that it was a straightforward process that only required attaching the appropriate library’s methods to the web page elements that originated these common keyboard actions.

    Indeed, the native capabilities of jQuery for handling different mouse and keyboard events are quite impressive, but they're only a small part of what can be done with it. The library comes with a robust set of additional methods that can be used to handle both “focus” and “blur” events with ease. In fact, with this library, it’s pretty simple to build JavaScript applications that respond to these particular events in a truly cross-browser fashion.

    Therefore, if you're interested in learning how to handle these specific events with jQuery, in the next few lines I’m going to develop some illustrative examples that will show you how to fire up a JavaScript function each time a web page element gets focus; I'll also show you how to handle it when such elements get blurred. In addition, I’ll be teaching you how to use the library to detect when a web form has been submitted by a user, so there’s a lot of material ahead of us that needs to be examined in depth.

    Let’s explore a few more useful features that come with the jQuery framework. Let’s jump in!

    More JavaScript Articles
    More By Alejandro Gervasio


       · The jQuery library comes with a set of additional methods that can be used to handle...
     

    JAVASCRIPT ARTICLES

    - Comparing Fields and Customizing Error Messa...
    - Checking Numbers and File Extensions with jQ...
    - Validating Digits and Dates with jQuery`s Va...
    - Validating Ranges, Emails, and URLs with jQu...
    - More Uses for the jQuery Tooltip Plug-in`s b...
    - Building Image-Based Tooltips with the jQuer...
    - Using the jQuery Tooltip Plug-in`s bodyHandl...
    - Using Rangelength, Min and Max with the Vali...
    - Using Minlength and Maxlength with the Valid...
    - Modifying Tooltip Coordinates with the jQuer...
    - Applying a Fade Out Effect with the jQuery T...
    - Tracking Mouse Movements with the jQuery Too...
    - Checking Online Forms with the Validator jQu...
    - Nested JavaScript Functions as Objects
    - The jQuery Tooltip Plug-in







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek