From the course: jQuery Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Handling events

Handling events - jQuery Tutorial

From the course: jQuery Essential Training

Start my 1-month free trial

Handling events

- [Narrator] If there's one thing that every modern web application has to do, it's deal with events. In this example, I'll show you a quick introduction into event handling with jQuery, which we will then dive into more detail in later on in the course when we get to the chapter on events. Let's open up events_intro, and before I actually go through the code, I'm gonna bring this up in the browser. And you can see as they move the mouse over this div here, there's some information being displayed inside the div. There's the mouse position, and there's whether or not a button is being pressed, and also an indicator of whether or not something called the metaKey is being held down. So you can see that as I move the mouse outside, the text changes to mouseleave, and when I click there's a click handler that shows you where I clicked. And let's go ahead and refresh. So now I'm moving the mouse again. And now I'm going to hold down the mac command key. So you can see that the key value is…

Contents