From 02c5b26c22627709a459fee722f331cd4c24ffa8 Mon Sep 17 00:00:00 2001
From: Jesse McCarthy Given a jQuery object that represents a set of DOM elements, the Given a jQuery object that represents a set of DOM elements, the The method optionally accepts a selector expression of the same type that we can pass to the Consider a page with a basic nested list on it:.parent()
method allows us to search through the parents of these elements in the DOM tree and construct a new jQuery object from the matching elements. The .parents()
and .parent()
methods are similar, except that the latter only travels a single level up the DOM tree..parent()
method allows us to search through the parents of these elements in the DOM tree and construct a new jQuery object from the matching elements. The .parents()
and .parent()
methods are similar, except that the latter only travels a single level up the DOM tree.$()
function. If the selector is supplied, the elements will be filtered by testing whether they match it.