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> f, <Node> r)
[edit]
Parameters
- n
- DOM node to search parents on or ID string.
- f
- Selection function to execute on each node, or string with comma separated tag names of nodes to select.
- r
- Optional root element, never go below this point.
[edit]
Returns
DOM Node or null if it wasn't found.
