WHAT YOU WILL LEARN IN THIS CHAPTER:
- Connecting your code to events to respond to user actions
- Writing standards-compliant, event-driven code
- Writing event code for older versions of Internet Explorer
- Handling the difference between standards-compliant and old-IE event models
- Dragging and dropping content with HTML5’s native drag-and-drop capabilities
- Animating elements by manipulating their positioning
WROX.COM CODE DOWNLOADS FOR THIS CHAPTER
You can find the wrox.com code downloads for this chapter at
Although these capabilities are very important in today’s web programming, perhaps the most important concept you’ll learn and use is that of events. In the real world, an event is, put simply, something that happens. For example, a ringing telephone is an event. If you are expecting a friend or colleague to call, you usually want to do something: Answer the call.
In programming, events are very similar to a telephone call. Something in the page will happen, and if it’s something you are expecting, you can respond to it. For example, the user clicking the page, ...