jQuery: Using The Basic Selectors

We will start with the element selector:

$(document).ready(function() {

In here we selected all the “p” elements and hid them, there are other built-in functions that we will be discussing in the future posts.

The second basic selector, is the “#id” selector, which is the following:

$(document).ready(function() {

So this selects the element with the id of “headerOne” and hides it. The third basic selector is the “.class” selector:

$(document).ready(function() {

Selects any element with the class: navigationClass. And finally, the “*” selector, selects all the elements:

$(document).ready(function() {

These were the basic selectors, for a full reference on jQuery selectors, visit this link.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s