Title: Introduction to jQuery - Selectors - Lesson II
Duration: 16:41 min
Description: This class will discuss some of the jQuery selectors in detail. First we start by creating a page that contains spans, divs, and lists within the divs. We add some styles for visual appearance. We start first with the hover functionality. Hover takes two functions: the first function is applied when we hover over an element, the second one is applied when we hover away from the elements. The we show how to use the fillowing selectors: selecting a tag with a specific css class name, selecting all the divs, selecting all the lists (ordered and unordered), selecting all the spans that are descendants of a div, selecting all the children of the body, selecting all the divs that are next to another div, and finally selecting all the spans that are siblings of a div.
Methodology: Using jQuery library.
Examples constructed: We create a page that contains 3 spans and 3 divs. We also add an ordered list and an unordered list to the divs. Our example will show the use of hover to apply/remove a class from the elements we hover over. We will also discover the use of descendants, parent/child, and siblings.