TinyMCE:API/tinymce.dom.DOMUtils/getParent
From Moxiecode Documentation Wiki
Contents |
[edit]
Method: getParent
[edit]
Summary
Returns a node by the specified selector function. This function will loop through all parent nodes and call the specified function for each node. If the function then returns true indicating that it has found what it was looking for, the loop execution will then end and the node it found will be returned.
[edit]
Syntax
<Node> getParent(<Node/String> n, <function/string> f, <Node> r)
[edit]
Parameters
- n
- DOM node to search parents on or ID string.
- f
- Selection function to execute on each node, or CSS expression like p,div,span.class.
- r
- Optional root element, never go below this point.
[edit]
Returns
DOM Node or null if it wasn't found.
