jQuery: Basic Selectors

Hey, I am back! It’s been a long time since I posted anything new, but here I am.

So today we will be discussing the basic jQuery selectors. jQuery uses CSS Selectors, which means this makes it easier for web developers, and not just that but it’s also cross browser compatible, which means you will not have to write any fallback code. It is also way easier than pure JavaScript. In JavaScript, you can do what jQuery does, but jQuery makes it easier for you, jQuery’s motto is: “Write Less, Do More” and you will see how.

There are 5 basic selectors:

*                                 – All Elements

element                     – All elements with that element name

#id                             – Element with that id

.class                         – Elements with that class

selector1, selector2 – Selecting multiple selections

These 5 will help you a lot in jQuery, but this isn’t all of it, there is more but for now, this is all what you have to know.

See you tomorrow!


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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s