December 2013
Intermediate to advanced
384 pages
9h 54m
English
$("div").has("p"); //selects <div> element that has <p> descendents $("div").has("#menu"); //selects <div> element that contains //the element that has id="menu"
The .has(selector or element) method reduces the set to those elements that have descendent elements that match the selector or contain the specified DOM element.
Read now
Unlock full access