.contains()
Determines if the supplied element(s) are descendents of the selected element(s).
Syntax
neon.contains(string selector)
neon.contains(Array elements)
neon.contains(DOMDocument document | DOMElement element | Window window)
selector
elements
document | element | window
This function takes the same type of arguments as neon.select. Please see that method for a description of its arguments.
Requirements
This method should be executed on a selection of elements. Please see the .select() method.
If any selected element is not a DOM node (for example, a Window object) this function may cause an exception.
Return value
Returns true if all of the elements passed as arguments are descendents of one or more of the selected elements, false otherwise.
This method is not chainable.
Description
This method may be used to determine if an element is the descendent of another in the document. An element is a descendent of another if it is the child element of the other, or if it is descended from one of its children.
If multiple elements are given as the argument to this method, then the method only returns true if all of the elements provided are children of any of the selected elements. If there are more than one selected elements, then each element passed in the argument may be a descendent of any one of the selected elements.