TinyMCE:API/tinymce.dom.DOMUtils/getParent

From Moxiecode Documentation Wiki

Jump to: navigation, search

Contents

Method: getParent

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.

Syntax

<Node> getParent(<Node/String> n, <function> f, <Node> r)

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.

Returns

DOM Node or null if it wasn't found.

Personal tools