Table of contents for Select anything

In my first post about jQuery Selectors call Select what you want, I went over some basic selectors that I use on a daily basis within a web based training framework I put together using jQuery. What I would like to cover are some of the situations I have ran into over the past year while using jQuery are my frameworks backbone.

Some of the selections we will cover are searching for links with an specific extension, images, images that wrapped in a link, links and definition lists.

Let me give you some background on the process. We have a content writer who supplies us with with a storyboard for the content and flow. We then create a separate Html page for each page within that storyboard. Each one of these pages is brought into the main page using the .load method for jQuery. All the selections are being done in the callback of the .load method, like:

The following will be the functional request that the writer asks for. Note the “this” in my selector calls is referring to textArea. Also note that these will not be optimized calls, for instance, if I were going to check for images or links multiple times for different things, I would do something like:

The JavaScript

The Final Word

Each project comes with different requirements; the requirements above were only a small part of the requirements for the most recent project but the rest of the list was pretty simple stuff. Feel free to post question or corrections.