Skip to Content
Head First jQuery
book

Head First jQuery

by Ryan Benedetti, Ronan Cranley
September 2011
Beginner to intermediate
536 pages
11h 46m
English
O'Reilly Media, Inc.
Content preview from Head First jQuery

Chapter 3. jQuery Events and Functions: Making Things Happen on Your Page

image with no caption

jQuery makes it easy to add action and interactivity to any web page. In this chapter, we’ll look at making your page react when people interact with it. Making your code run in response to user actions takes your website to a whole new level. We’ll also look at building reusable functions so you can write the code once and use it multiple times.

Your jQuery skillz are in demand again

Emily was pleased with the work you did for her Jump for Joy promotion, but she’s met with her accountant and now has a few changes she’d like you to make.

From: Jump for Joy

Subject: RE: Jump for Joy Promotion

Hey,

You did a great job of making the web promotion work! I met with my accountant and crunched some numbers on the success of the promotion.

My accountant suggested some changes to the app that should bring in more sales.

Visitors should still get four options to pick from for the chance to receive a discount. However, now let’s make it the same discount amount each time. My accountant recommends offering 20% off visitors’ purchases before they check out. That should be more enticing for them.

Visitors should only get one chance to find the discount code, which should be in a random square for each visit. If a visitor finds the discount code when she clicks, show it to her on the screen before she proceeds. Otherwise, show her ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Beginning jQuery: From the Basics of jQuery to Writing your Own Plug-ins

Beginning jQuery: From the Basics of jQuery to Writing your Own Plug-ins

Jack Franklin, Russ Ferguson
Learning jQuery 3 - Fifth Edition

Learning jQuery 3 - Fifth Edition

Adam Boduch, Jonathan Chaffer, Karl Swedberg

Publisher Resources

ISBN: 9781449311988Errata Page