Thursday, November 18, 2010

Selector Terminology (Itemization)

Before you can start with HTML document, you need to locate the applicable portions. In our script, you sometimes use a approach to find an element like:
$('#introduction')

This expression creates a new jQuery object that references the element with the ID introduction. On the other hand, sometimes you might require a more intricate selector.
$('#introduction > h2 a')

Here I produce a jQuery object referring to potentially many elements. With this Expression elements are included if they are anchor tags that are descendants of <h2> elements, which are themselves children of an element with the ID introduction.

No comments:

Post a Comment