Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed jQuery Basics!
You have completed jQuery Basics!
Preview
Use jQuery's on() method when handling events for extra flexibility.
Further Reading
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
other event types such as mouseover,
or when a mouse moves over an element.
0:00
Keypress for when a user presses
a key in an input element, and
0:02
the focus event,
when an input field captures focus, or
0:06
in other words when the cursor
appears in an input field.
0:10
These methods are fine for simple
applications, but they have their limits.
0:14
For example,
0:18
what if I wanted to add more than one
event listener to this button element?
0:19
What if I wanted to reveal the spoiler
not only if they click the button but
0:23
if they press Enter or something else?
0:28
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up