This course is out of date and does not reflect our standards or industry best practices. We now recommend you take the Complete Intro to Web Development, v3 course.

Check out a free preview of the full Introduction to JavaScript and jQuery course:
The "jQuery Selecting Tips" Lesson is part of the full, Introduction to JavaScript and jQuery course featured in this preview video. Here's what you'd learn in this lesson:

Store selectors in variable for later use (can prefix variables with $ to identify it as a jQuery collection) Use .length to check if something exists, but often times you don’t need to because jQuery operates on empty collections without throwing an error Avoid custom selectors (slow) and alternatives Selector methods like first, eq, and slice are better than pseudo selectors like :first

Get Unlimited Access Now