Bummer! This is just a preview. You need to be signed in with a Treehouse account to view the entire video.
Using jQuery to Select Elements0:51 with Andrew Chalkley
jQuery allows you to select elements with the same CSS selectors you're familiar with. In this video we'll introduce to you the basic jQuery syntax that you use with these CSS selectors.
If you're already familiar with CSS, you should feel right at home with jQuery.
JQuery lets you add behavior to an element by selecting the CSS selector.
To select an element in jQuery, you'd use the following syntax--
dollar sign, a pair of parentheses, and a string representing a CSS selector.
This is what it would look like if you were to select an element with the id of container.
And this is what it would look like if you were selecting all the link elements
nested within a nav element.
Actually, any valid CSS selector works with jQuery including CSS3.
Coming up is a code challenge to put you to the test.
Are you ready?
You need to sign up for Treehouse in order to download course files.Sign up