From the course: jQuery for Web Designers

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Select elements

Select elements - jQuery Tutorial

From the course: jQuery for Web Designers

Start my 1-month free trial

Select elements

- [Voiceover] One of the things that made jQuery really popular when it first came out many years ago was its ability to select elements on the page using CSS syntax. In this video, we're going to look at how to work with that. I'm going to do everything in my JavaScript console here. So I'm going to open that here in Chrome, in the View menu, and the JavaScript Console. This will save me having to work in an external file and having to keep reloading. I can just work in the console and execute things immediately to see what they do. Now this is Hansel and Petal, a fictitious flower shop that we've used in other courses. And looking at the Elements pane here in the Web Inspector, I can see all of the currently rendered DOM. So here's my main DIV where most of the site lives. Here's my header, main menu, content footer and so forth. And as you can see, as I mouse over each of these elements in the Chrome Web Inspector, they're highlighted on the page for me. Pretty cool. So I'm going…

Contents