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
We start planning our spoiler revealer and learn a bit about using descendant selectors with jQuery.
Click event listener example:
$( "#target" ).click(function() {
alert( "I've been clicked!" );
});
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
We've got this spoiler and this revealer
button, that doesn't yet do anything.
0:00
Lets start by opening up a workspace and
going to the app.js file.
0:02
We'll take some quick notes about what
we'd like our programming to accomplish.
0:09
The idea is to take the task at hand and
break it down into smaller steps.
0:13
To be able to reveal the spoiler,
it will need to start out hidden, right?
0:17
So first,
we'll hide the spoiler on page load.
0:21
Secondly, when the button is pressed,
show the spoiler and hide the button.
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