December 2013
Intermediate to advanced
384 pages
9h 54m
English
$("div").contents(); //selects all the immediate child elements in <div> elements $("select").contents(); //selects all the <option> elements in <select> elements
The .contents() returns a jQuery object representing the immediate children of the current set of elements. This is especially useful when getting all the <li> elements in a list or the <option> elements in a <select> block.
Read now
Unlock full access