More Mouse and Keyboard Events with the jQuery JavaScript Library
Welcome to the fourth article in an eight-part series on the jQuery JavaScript library. In this part, I will walk you through using a pair of brand new methods provided by the library for processing some additional keyboard-related actions, such as keydown and keyup events.
More Mouse and Keyboard Events with the jQuery JavaScript Library - Review: mouse overs and keydown events with jQuery (Page 2 of 4 )
In case you haven't had the chance to read the previous tutorial of the series, where I explained how to handle mouse overs and keydown events with the jQuery library, below I listed a couple of examples that show how to perform these specific tasks. Here they are:
(example on handling a 'mouseover' event with jQuery)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
These were really simple to code and grasp, right? As you can see, the pair of examples listed above demonstrate in a nutshell how to build basic JavaScript applications that respond to mouse overs and keydown events. Of course, in this case, the applications will display a couple of alert boxes on screen in response to those events. This simple concept, however, can be easily applied when working with real-world projects.
So far, so good. At this point, you hopefully realized that handling mouse and keyboard events by way of the jQuery library is simple. So, what comes next? Well, as I mentioned in the introduction, in the section to come I'm going to provide you with another hands-on example to demonstrate how to process keypress events by using a brand new method of the jQuery package.
To see how this will be achieved, please click on the link that appears below and keep reading.