JQuery secret weapon 1 Using selectors and filters

It is time to start having some fun with jQuery! I feel jQuery can be broken down into three core strengths, what I deem as its "secret weapons":

• Understanding selectors and filters

• Manipulating CSS and content

• Working with events and effects

If you get a handle on these top three strengths, you're well on your way to being a jQuery rockstar!

This first item, understanding selectors and filters, is essential. You need to have a strong understanding of selectors and filters if you're going to be able do anything else with jQuery. The better you are at using selectors and filters, the better you'll be with jQuery period.

Selectors and filters give you the ability to (you guessed it!) select objects on your page into the jQuery wrapper object and then work with and manipulate them in just about any way you'd see fit. The selectors will allow you to easily grab an array of elements using easy CSS syntax. Filters will then further narrow down and refine the results of that array.

Keep in mind, the objects selected into the jQuery wrapper using selectors and filters are not really DOM elements anymore. They are an array of objects in the jQuery object wrapper that have a whole set of functions and capabilities available. If you ever need to, you can weed down through all the jQuery added items and functionality in each array element to the actual DOM element, but why? The whole point of jQuery is to get you around that but it's good to know it's there.

Blogging For Business

Blogging For Business

Download this Guide And Discover How Start And Run Your Very Own Successful Business Blog. Always Wanted To Start Your Own Blog?

Get My Free Ebook


Post a comment