December 2013
Intermediate to advanced
384 pages
9h 54m
English
$("div span"); //selects <span> elements with a <div> ancestor $("div.menu > span"); //selects <span> elements whose immediate parent //is a <div> with class="menu" $("label + input.textItem"); //selects <input> elements with class="textItem" that //are immediately preceded by a <label> $("#menu ~ div"); //selects all <div> elements that are siblings of //the element with id="menu"
An important set of jQuery selectors is the hierarchy selectors. These selectors allow you to select HTML elements based on the DOM hierarchy. This allows you to write dynamic code that is more content aware by only selecting elements based on parents, children, or other elements ...
Read now
Unlock full access